Hi.. how can i check the input text is exists in the table.. I have tried lookup function in the onchange but its not working.. if its not exists i want to show validation like not exist too.. can anybody help?
@v-xida-msft Hi thank you for your time.. I have tried this also but not working
Hi @neethup ,
Could you please share a bit more about the ClientID column in your SQL Table? Is it a Number type column or Text type column?
Currently, I could not reproduce your issue on my side.
If the ClientID is a Number column in your SQL Table, please consider modify your formula as below:
If( IsBlank(LookUp('[dbo].[CUSTOM_cmClient]', ClientID = Value(DcClientID.Text))), /* <-- If the ClientID is a Number type column in your SQL Table */ Set(ShowErrorMsg, false), Set(ShowErrorMsg, true) )
In addition, I also think a Timer control could achieve your needs. Add a Timer control in your app, set the Duration property to following:
1000
Set the AutoStart property and Repeat property to following:
true
Set the OnTimerEnd property to following:
If( IsBlank(LookUp('[dbo].[CUSTOM_cmClient]', ClientID = Value(DcClientID.Text))), /* <-- If the ClientID is a Number type column in your SQL Table */ Set(ShowErrorMsg, false), Set(ShowErrorMsg, true) )
Set the Visible property of the Timer control to following:
false /* <-- Hidden the Timer control */
Set the Visible property of the Error Message Label to following:
ShowErrorMsg
Best regards,
Hi @neethup ,
Could you please share a bit more about your formula?
Could you please share a screenshot about it?
Please note that the OnChange property of the Text Input box would be fired only when you move the mouse focus from the Text Input box to other place in your app.
Currently, I could not reproduce your issue on my side, please check if you have typed proper formula within your app. Also please consider re-create a new app, then try above solution again.
Note: Please make sure the Network is in good condition on your side.
Best regards,
@v-xida-msft Hi., i have tried this but nothing is getting worked.. not even showing error message
Hi @neethup ,
Do you want to check if the entered Text value existed in your data source already?
Could you please share a bit more about the LookUp formula in your app?
Based on the needs that you mentioned, I think the OnChange property of the Text Box and the LookUp function could achieve your needs.
I have made a test on my side, please take a try with the following workaround:
Set the OnChange property of the Text Input box (TextInput1) to following:
If( IsBlank(LookUp('20190701_case7', Title=TextInput1.Text)), Set(ShowErrorMsg, false), Set(ShowErrorMsg, true) )
On your side, you may need to type the following:
If( IsBlank(LookUp('YourDataSource', FilteredColumn = TextInput1.Text)), /* <-- FilteredColumn represents the column in your data source, which you want to compare with the Text Input value */ Set(ShowErrorMsg, false), Set(ShowErrorMsg, true) )
Add a Error Message Label under above Text Input box, set the Text property to a error message you want to display. e.g.
"The value you typed has been existed, please re-type a new one!"
set the Visible property of the Label to following:
If(ShowErrorMsg, true, false)
Please check the following GIF screenshot for more details:
Best regards,
Hi @neethup
Put a label field on the screen. Set it's Text property to IsEmpty(Search(table,TextInput1.Text,"Column1","Column2",etc). In order to search a table, you need to define which columns of data need to be searched. The Textbox will return false if the text in the textinput control is found in one of the columns you are searching. If the text is not found, it will return true.
@Drrickryp I dont want to filter datatable.. i have a textbox field if i input something it should check the input text is exist in the table or not
WarrenBelz
146,751
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,091
Most Valuable Professional