I would like to concatenate 2 fields value in one field that is ; I need the value in field 1 + the value field 2 in the third field.
Field 1 = name 1
Filed 2 = city
Field 3 = name 1 – city
This can be achieved by two ways please see below.
1) Either user can write concatenation rule on the individual fields that is Field 1; Field 2 etc ; For teh concatenation to work effectively rule need to be written on all the fields that need to be concatenated.
2) Or user can add the function in the Default Value of the Designated field that is Field 3 in above scenario.If using Default value make sure Refresh Default value is marked to True.
Rule to be written in both scenarios is concat($form.getValue('/my:myFields/my:field_1'), $form.getValue('/my:myFields/my:field_2'));
Same can be used for more than 2 fields that is if user requirement is to add the Field1 +Field2 +Field3+ Field 4 in Field 5 then all these fields need to be added in the above rule.
Sample solution attached created in version 12.1.
Addition to this if customer would like to have more customization that is the concertinaed field should only hold 40 characters etc; then they would need to follow below steps.
1) We would need to write the below rule which will concatenate and also truncate the String to 40 characters and for the second field we will write the rule in second field as shown in Screenshot 2.