Hello,
I would like to make my text input box only accept 6 digit numbers only. Additionally, I would also like to make it so that whichever 6 digit number that is entered is looked up in reference to the SharePoint list that is connected to my app. I am not sure how to go about that. After this number is looked up, a pop-up should occur letting the user know that the number they entered was found in the records.
Thank you
Hi @Anonymous ,
I've made a test for your reference:
Set the text input control's Default property to:
"000000"
Set it's OnChange property to:
If(
!IsMatch(Self.Text,"\d{6}"),
Reset(Self);Notify("input box only accept 6 digit numbers only"),
If(
!IsBlank(DataSource,ColumnName=Self.Text)),
Notify("number was found"),
Notify("number not found")
)
)
Best Regards,
Bof
Hi! I assume you are speaking about a canvas app. You could set the txt input properties as follows:
Format: Number
MaxLength: 6
Hint Text: "Input 6-digit number"
OnChange - due to lack of infos, just a basic logic 🙂 :
If(
Value(Self.Text) = *yourDataSourceColumn*.Value,
Notify("Number already used",NotificationType.Information),
Patch()
)
------------------------------------------------------------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.
If you like my response, please give it a Thumbs Up.
WarrenBelz
211
Most Valuable Professional
MS.Ragavendar
108
stampcoin
80