Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

I want to hide an element from a gallery

(0) ShareShare
ReportReport
Posted on by 320

I hope to describe my problem well

 

You will see that I have 2 images in a gallery, these are


White Star

Y

yellow star

 

when I click on the white star it is hidden and the yellow star is shown and vice versa when I click on the yellow star it is hidden and the white star is shown

The problem is that it is happening in all records.

look at the next gif image

I click on the white star of the record "Approval of documents"

and the yellow star appears in all records

it should appear only in the record that the star was selected

 

star white-

OnSelect- set(visible, true)

visible- !visible

 

star yellow

OnSelect- set(visible, true)

visible- visible

 

 

8FD928AC-E8D1-4E31-8D06-612D97F65895.gif

Categories:
  • Verified answer
    RezaDorrani Profile Picture
    RezaDorrani 12,141 on at
    Re: I want to hide an element from a gallery

    Hi @octaking 

     

    Set function is setting a variable which applies to show hide logic of all your items

     

    Your best bet would be to create a collection and then drive your gallery from that collection

    You can add a column to that gallery called ImageSelected

    Each time the image is clicked, Update that gallery line item with ImageSelected to Yes or No

    and accordingly drive the visibility

     

    Regards,

    Reza Dorrani

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

     

     

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,508

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,839

Leaderboard