cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Configuring button to not continue unless a value is found within a database table

Morning Powerapp crew!

 

I've been developing an app with a chap who looks after the azure database side of things.

 

We have 2 screens.

Screen one tells them to enter a post code - they type this in, and then click continue, and it takes them through to screen 2, where the first drop down is then populated with all properties from the table that share the postcode they have put in.

The API has been configured to return a 'Postcode not found' in the first drop down IF they choose one that is not in the list.

 

Is there anyway I can configure the button not to proceed though, if the postcode is not valid?

 

The current script in there is as follows:

 

Button from first screen:

Navigate(Screen2, ScreenTransition.Fade, {postCode:I_Postcode.Text})
&
Reset(I_Postcode)

 

Thanks

Dan

1 REPLY 1
Highlighted
Dual Super User
Dual Super User

Re: Configuring button to not continue unless a value is found within a database table

Hi @Dan_B 

 

You can set the display mode property of the button control as:
If(I_Postcode.Text in TableName.ColumnName, DisplayMode.Edit, DisplayMode.Disabled)
 
TableName.ColumnName, Here you need to pass the table and column name where all the post codes aer saved.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (10,773)