Hi Everyone,
I have a phone number text input that changes the number into the correct format: (###) - ### - ####. I did this by setting the Phone # datacard update to:
If(IsMatch(ti_phone1.Text, "^\(\d{3}\) \d{3}-\d{4}$"),
ti_phone1.Text,
Blank()
)
The OnChange for ti_Phone # is:
Set(formattedNumber, Text(Value(ti_phone1.Text), "[$-en-US](###) ###-####"))
and the Default is : Coalesce(formattedNumber,Parent.Default)
The overlay works perfectly but when I enter a number, save, and edit a different item, the phone number I entered previously overwrites the existing number. I would like to edit the field and have the existing phone number remain. I do NOT want it to default back to the last record I edited.
Any assistance would be much appreciated!
Thank you.
Hi @Masonf2265 ,
The issue is in the Default property as your function will always return formattedNumber, which is updated last when working on the previous record. Not sure why this was implemented, but replacing it with simply Parent.Default should do the trick.
Hello,
I tried this but then my overlay function does not work.
Hi @Masonf2265 ,
The only option I can then think of is to set variable formattedNumber to Blank in parallel with submitting/resetting your form. The Coalesce() function will then skip it, returning Parent.Default.
Hi @Masonf2265 ,
Did you have any joy finding the solution for your issue? If so, please mark the solution for other users to benefit.