Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Open details for the action Validate Contact
  • Go to the section StreamItem Updates Update StreamItems section
Note

Because we have set Copy Values by Name, we only need to add a rule for values we want to manipulate.

If Copy Values by Name was not ticked, we would need to set a rule for every value you want to save to the stream.

  • Open the list of stream attributes, and drag PhoneNumber into the list of stream item updates
  • Double click on the rule to open the details
Note

Note that the default expression for the rule is:

Code Block
_form.PhoneNumber

This is the value typed into the phone number field on the edit form, and therefore this simply copies the typed value into the stream.

This expression can use any value from _form, and any of the attribute functions, to set the value as needed.

  • Update the expression to replace a leading 0 with 44:
Code Block
replaceFirst(_form.PhoneNumber, "^0", "44")
  • Save your changes to the stream item update rule

Go into App Mode. Update a record - you will see the leading zero replaced by 44. Because this action backs both the Add and Update buttons, this is also true for newly entered contacts.

Panel

Next chapter: TODO