cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JamesM
Level 8

Set value to true if text in InputTextBox found within Gallery Items?

I've tried the below, but false never changes to true 😞 

 

What I really want to do is disable the 'Save' button if the user has typed in a group name that exists already in the gallery. 

 

2018-12-07 11_05_59-Window.png

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Set value to true if text in InputTextBox found within Gallery Items?

hi @JamesM,

Do you want to make the ‘save button invisible when a value user typed in textInput control has been existed in the gallery

Could you please share a bit more about the “TitleGroupName” within your formula? Is it a Label control in your Gallery?

 

Based on the formula you provided, I think there may have something wrong with your formula.

 

I made a test on my side.  It worked.

16.PNG

Set the visible property of ‘save button to: isfound

Set the onchange property of textinput1 to :

If(TextInput1.Text in Gallery1.AllItems.Title,UpdateContext({isfound:false}),UpdateContext({isfound:true}))

 

regards,

eason

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

View solution in original post

2 REPLIES 2
Highlighted
samuelJ
Level 8

Re: Set value to true if text in InputTextBox found within Gallery Items?

Hi,

 

You should try to code something like the below, that will check if a record exists:

 

if (Count(LookUp(TablePopulatingGallery, TablePopulatingGallery.SomeField = TextInputGroupName.Text)) > 0, //true Code, //false Code)

 

You should check the table/collection populating the gallery.  Also i don't see anywhere where the variable is set to false, only true.  Is there a reason you do not set the varaible to false? Is it set to false somewhere else? 

Community Support Team
Community Support Team

Re: Set value to true if text in InputTextBox found within Gallery Items?

hi @JamesM,

Do you want to make the ‘save button invisible when a value user typed in textInput control has been existed in the gallery

Could you please share a bit more about the “TitleGroupName” within your formula? Is it a Label control in your Gallery?

 

Based on the formula you provided, I think there may have something wrong with your formula.

 

I made a test on my side.  It worked.

16.PNG

Set the visible property of ‘save button to: isfound

Set the onchange property of textinput1 to :

If(TextInput1.Text in Gallery1.AllItems.Title,UpdateContext({isfound:false}),UpdateContext({isfound:true}))

 

regards,

eason

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

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 256 members 6,511 guests
Please welcome our newest community members: