Skip to main content
luc_cpl
Participant
September 7, 2018
Question

Is it possible to check destination field value with initial field value and then insert changed value in a field?

  • September 7, 2018
  • 1 reply
  • 357 views

To clear things up a little bit:

Field1.value = Test (this one is copied to Field 2)

Now Field1.value is changed to “Tester”.

As I have multiple fields which are copied into a list on another page, I have to check, if destination field value equals the initial field value of Field1 (“Test”) and if so, overwrites it with the new value “Tester”.

If not the Field1.value should be copied into an empty field.

This topic has been closed for replies.

1 reply

Inspiring
September 7, 2018

The field object has both a "value" property and a "defaultValue"  property so it is possible to compare the value of field to it's or another field's default value. You will have to use the "getField" method to access a specific field's object. If your script is accessing a field you currently are in,then use the "event.value".