cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper IV
Helper IV

Validate input text is exists in the table

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?

11 REPLIES 11

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,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-xida-msft Hi thank you for your time.. I have tried this also but not working

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (48,748)