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

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
Highlighted
Community Support
Community Support

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
Responsive Resident
Responsive Resident

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? 

Highlighted
Community Support
Community Support

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
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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