web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Doubt in the Gallery a...
Power Apps
Unanswered

Doubt in the Gallery and Forms

(0) ShareShare
ReportReport
Posted on by 83

Hi,
I'm having problems with ONCHANGE in forms, they are also changing another item on the form, for example:
If in ONCHANGE I set to make visible a COMBOBOX of an item in the gallery and click on another item, that COMBOBOX will also be visible on that other item

 

ONCHANGE

 
 

 

UpdateContext({locDesligou2:true });;

 

 

 

 

chrome_34OUkQhYsu.gif
Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    154,953 Most Valuable Professional on at

    Hi @MayranPiran ,

    If you are setting the property in a Gallery, then each control in the gallery is actually the same control in all records. You could make the Visible

    locDesligou2 && ThisItem.IsSelected

    which would only be visible in the current selected record, but I am not sure what you are trying to do here.

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

  • MayranPiran Profile Picture
    83 on at

     

    @WarrenBelz 

     

    every time I select a date I would like another date to appear below, so I put it on ONCHANGE (I recorded a video showing it).

     

    where should i put the one you passed?

    locDesligou2 && ThisItem.IsSelected

     

    MayranPiran_0-1674729935490.gif

     

  • WarrenBelz Profile Picture
    154,953 Most Valuable Professional on at

    @MayranPiran ,

    Sorry, quite confused now - your original post updated a Variable OnChange and referred to Visible properties of a Control, now you are referring to adding another record ?

  • MayranPiran Profile Picture
    83 on at

    Sorry,
    that's right, on the date's OnChange property is the

     

    UpdateContext({locDesligou2:true });;

     

    this will bring up a new record (a new date)

    remembering, I would like to make visible only the first date whenever a new item is created in the gallery and when I edit that date automatically another record will appear due to OnChange and then I save this information, then I will select another item from the gallery and I would like the two records not to appear and only the first one.

     

    Sorry for the mess I'm using the translator

  • WarrenBelz Profile Picture
    154,953 Most Valuable Professional on at

    @MayranPiran ,

    Sorry, totally lost (maybe in Translation) - how can a Variable create a new record ? Note I will be offline overnight now due to time zone.

  • MayranPiran Profile Picture
    83 on at

    @WarrenBelz 

     

    With this video I think it's easier to understand hahaha, I'm really sorry...

     

    I don't want the card "DESLIGAMENTO 2" and "LIGOU 2" to appear in the TEST item since it has not been changed in the OnChange of the date of the TEST item

    chrome_adsxsMxTHc.gif
  • WarrenBelz Profile Picture
    154,953 Most Valuable Professional on at

    @MayranPiran ,

    Sorry, I am really struggling with this - why is it visible if you have not changed the Date and therefore have not set the Variable ? I think that is what you need to focus on - this is a logical debugging exercise rather than any coding issue.

  • MayranPiran Profile Picture
    83 on at

    @WarrenBelz 

     

    No problem, thanks for trying to resolve the issue.

    Anything come back here if I managed to solve the problem.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 514

#2
WarrenBelz Profile Picture

WarrenBelz 419 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 295

Last 30 days Overall leaderboard