ID_Code = TextInput1.Text
If I enter a string such as "ABC" into TextInput1, the above code will tell me if he user input (ABC) exists in the database's ID_Code column. Is there a way to get this to work with numbers? For example, if I type 123 into TextInput1, the code should check that specific input to see if it exists in the database. I had a look into casting, but couldn't get anything to work.
Solved! Go to Solution.
To cast the textbox value to a number simply use this
Number(TextInput1.Text)
Good luck
Sean
As @bean suggested, if you need to compare the value of a text box to a numeric column in your data source, you should convert it to a number first - using the Value function. For example, you can have a gallery with this expression for its Items property:
Filter(MyDataSource, ID_Code = Value(TextInput1.Text))
Does this help?
If(IsNumeric(TextInput1.Text), "Number", "Alphanumeric")
Sean
If you could provide more detail on what you're trying to do that will help more.
Cheers
To cast the textbox value to a number simply use this
Number(TextInput1.Text)
Good luck
Sean
As @bean suggested, if you need to compare the value of a text box to a numeric column in your data source, you should convert it to a number first - using the Value function. For example, you can have a gallery with this expression for its Items property:
Filter(MyDataSource, ID_Code = Value(TextInput1.Text))
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
189 | |
56 | |
49 | |
37 | |
36 |
User | Count |
---|---|
270 | |
87 | |
80 | |
76 | |
74 |