Showing results for 
Search instead for 
Did you mean: 
Helper III
Helper III

Hide / Unhide fields based on text input in another field



I believe this should be a simple one but I cant seem to make this work. I have a single line field named "QTY" which will have a number entered ranging from 1 to 12.


Depending on that number, it will then show the relevant number of fields to then be populated with text describing the item. 




QTY = 3


Item 1: Description text (entered by user)

Item 2: Description text (entered by user)

Item 3: Description text (entered by user)



In "Item 1:" visible options, I have the following: If("3" in DataCardValue7.Value,true,false)........ but no joy when 3 is entered in the QTY field. 


Would it also be possible as I move down the item number description fields, that not just a specific number unhides the field but a range of numbers instead.


Any help will be appreciated!!!






@MiniMe83 ,

Happy to help - please repeat this post as a new thread and tag me a the top and I will respond - although the first part sounds a bit strange.



Could I have more than 1 datacard controlling the visibility of another set of datacards on one form using the same method as you mentioned?


For instance, I’ve done what you have suggested last time we spoke by using vQty>0 in the visibility of the fields I want to hide or show depending on the number entered into a certain datacard field, put UpdateContext({vQty:Value(mydatacard)}) into the OnChange field of the controlling datacard and added UpdateContext({vQty:0}) to the OnVisible section of the screen.


Could I change the vQty naming convention for something else?


Thanks for your help!!

Hi @MiniMe_83 ,

Yes you could in concept do that, but obviously use another variable name.


Are there any restrictions to variables name? Say, I would like to use C1Qty in place of vQty? Would this potentially work? Obviously I would need to repeat the process with the variable name being added to other sections of the app.


Thanks for replying 

Hi @MiniMe_83 ,

You can call variables whatever you want except the names of existing fields, items forms etc or Reserved command words, so C1Qty will be fine.


Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.



So it looks like it can't handle two setups that are pretty similar on the same screen...

In the OnVisible of the screen I have: UpdateContext({C1Qty:0}); UpdateContext({vQty:0}) - It seems the first "UpdateContext" always works but the 2nd never gets completed. I've removed and swapped them around and not changing anything else and they work fine, providing they're first inline or just on their own.


Am I missing something?



@WarrenBelz  - Ive also tried: UpdateContext({vQty:0, C1Qty:0}).......😕

Hi @MiniMe_83 ,

There is no reason 




would not set both of these variables. 
What exactly are you trying to do with the first one?

Helpful resources

Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,119)