Hi,
I have a textbox which should take "*" as default value. Also, it should accept only numeric values up to 1 decimal point and value should not be greater than 100, since it is percentage.
Example: Accepted values in Textbox : *, 23.1, 32.1, 100, etc..
Not Accepted : 23.22, 101, etc..
Please help me with regular expression or what is the best way to achieve this.
Hi @vakula ,
I did a test for you.
1\ Add a textinput control 'TextInput1' and set its Default property to:
"*"
Set this textinput control's Onchange property to:
Set(Thevar,TextInput1.Text);If(IsMatch(Thevar,"^([0-9]|[0-9]\.\d+|[1-9][0-9]|[1-9][0-9]\.\d+|100)$")&&Or(IsBlank(Find(".",Thevar)),Len(Mid(Thevar,Find(".",Thevar)+1))=1),Thevar,Reset(TextInput1))
2\ The result is as follows:
Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.
WarrenBelz
75
Most Valuable Professional
mmbr1606
51
Super User 2025 Season 1
MS.Ragavendar
36