Friends,
We have a need to suppress comma "," while text field keyboard entry in a canvas application inorder to avoid getting commas persisted to the CDS.
for example "Customer Address" Text field should not be allowed to have commas in it.
This is urgent, please help.
please suggest
I am not sure if the logic here is the behavior that you expect:
With({dcv:Substitute(DataCardValue3_1.Text,",","")},
If(
Len(dcv) = 8 || Len(dcv) = 10, SubmitForm(CreateRequestEntry),
Notify("Your data has been accepted",NotificationType.Success, 4000
); Navigate(ReviewListScreen, None
),
Notify("Improper data format",NotificationType.Error
),
),
)
This should create a temporary variable that strips the commas from the DataCardValue text input box.
Then if the length of the variable is either 8 or 10, it will submit the form, notify the user that the data was accepted and navigate to the next screen. If the length of the variable is not 8 or 10, it will notify the user that the data is improper.
Thanks Drrickryp,
I have put below code at OnSelect of a button on a canvas. Any idea why it does not execute the first line?
if block, from second line, executes but not the first line. if block creats a record at CDS.
DataCardValue3_1.Text=Substitute(DataCardValue3_1.Text, ",", "");
If(
Len(DataCardValue1_1.Text)<> 8 Or Len(DataCardValue12_1.Text) <> 10, Notify("Improper data format",NotificationType.Error),
If(
SubmitForm(CreateRequestEntry),
Navigate(
ReviewListScreen,
None
),
true
)
);
Substitute(TextInput1.Text, ",", "")
WarrenBelz
48
Most Valuable Professional
mmbr1606
41
Super User 2025 Season 1
MS.Ragavendar
36