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 / Gallery Icon - Set vis...
Power Apps
Answered

Gallery Icon - Set visibility

(0) ShareShare
ReportReport
Posted on by 289

Hi Guys,

I have a power app featuring a gallery with a collection as a source.

Each row on the gallery has some input boxes and 2 icons (icon_save and icon_success).

When a user presses icon_save, I would like to make the following changes:

icon_save.visible=false

icon_success.visible=true

I have tried adding this code to the icon_save 'on select' property but it does not work 🙄

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @JimJim 
    You cannot directly set the properties of controls like that.  Just like cells with formulas in Excel derive their values from other cells, you need to put formulas on the Visible properties of your icons to determine their state.

    I am not sure what your logic is for saving or success, but it would depend on how you are doing those functions.

     

    I hope this is helpful for you.

  • JimJim Profile Picture
    289 on at

    @RandyHayes , Thank you, I did not know this.

    I will rethink how I do this and post my solution here

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @JimJim 

    Sounds good.  If you get stuck...post back with the issues.

  • JimJim Profile Picture
    289 on at

    I can't quite figure this one out, here is how my gallery is looking:

    JimJim_0-1629470619755.png

    The on select property of icon_save has the following code added to it

    Set(v_itemno,ThisItem.ItemNo)

    Then the visibility property of icon_success is set to 

    v_itemno=ThisItem.ItemNo

    This does not work at all 😩

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @JimJim 

    Actually, you are on the right track!  

    The only issue with that formula is that if the person then clicks on another save icon in another row, the original one that was not visible will become visible as well.

    The other thing is that you are immediately setting the success icon visible at the click of the button...if the icon is to provide visual indication that it was a success...where is the check that it was actually a success?

     

    What are you seeing happen with the current formula you have now?

  • JimJim Profile Picture
    289 on at

    When the form first loads, I can't even see the save button

  • Verified answer
    JimJim Profile Picture
    289 on at

    Hi Guys,

    I managed to work this one out, it was as simple as setting the icon's visibility property to: 

    CountRows(Filter(ProductsCollection,ItemNo=dd_ItemNo.Selected.Result))>0

    If the item existed in my collection it would show the success icon.

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 600

#2
WarrenBelz Profile Picture

WarrenBelz 478 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 322

Last 30 days Overall leaderboard