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 Apps
Answered

Gallery Item Edit

(0) ShareShare
ReportReport
Posted on by 640

Hello People,

 

I'm using a blank gallery to add custom fields. If the user selects the Pin below it should show Textbox. I have item property set for this pin is: UpdateContext({Discpop:true});Select(Parent);

 

omi18_0-1597170013729.png

And textbox visible property is: Discpop 

 

When I click on the pin nothing happens. 

 

Thanks,

Omi 

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

    @omi18 

    If you are in a Gallery and want only to show one textbox in that row when you click the icon, then you will need to implement a way to "remember" what row is "on".

     

    This is a good place for a collection!  Something similar to this will give you what you want.

    OnSelect action of your Icon:

    If(IsBlank(Lookup(colPins, ID=ThisItem.ID, ID)),
     Collect(colPins, {ID:ThisItem.ID}), 
     RemoveIf(colPins, ID=ThisItem.ID)
    )

     

    For the DisplayMode of your TextBox:

    If(ThisItem.ID in colPins.ID, Edit, View)

     

    This will give you the option to have multiple textboxes open to edit and when not selected, they will be in View mode only.

     

    I hope this is helpful for you.

  • omi18 Profile Picture
    640 on at

    Hello, @RandyHayes ,

     

    I'm new to this. what is ID in your given formula? 

     

    Thanks,

    Omi

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

    @omi18 

    No worries...

    What is the Items property of your Gallery?  Is it set to a DataSource?  What kind of datasource?

  • omi18 Profile Picture
    640 on at

    @RandyHayes ,

     

    Gallery Items property: Filter('[discount].[TotalTuitionDiscount]',If(IsBlank(SelectBUID.Selected.Result),false,BUID=SelectBUID.Selected.Result))

     

    I'm using SQL Server as a database. 

     

    -Omi

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

    @omi18 

    So do you have a unique field in your data?  Perhaps the primary key?

    If so, that is what you would substitute in place of ID in my formulas.

  • omi18 Profile Picture
    640 on at

    @RandyHayes ,

     

    Nothing is happening after that.  🙄

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

    @omi18 

    Can you elaborate a little more on what you mean by nothing is happening?

    What are your formulas?  What errors?  What do you expect to happen that is not?

  • omi18 Profile Picture
    640 on at

    @RandyHayes 

    My expectation is when users click on the icon, the input textbox should be visible to them. Once the user enters the value on the click of the submit button textbox will go hidden.

     

    My current formula is: If(IsBlank(LookUp(colPins, ID=ThisItem.StudentID,ThisItem.StudentID)), Collect(colPins, {ID:ThisItem.StudentID}), RemoveIf(colPins, ID=ThisItem.StudentID));

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

    @omi18 

    So, when you click on the Icon.  Please then look at your collection in the collection viewer and confirm that you have an entry for that particular ID.

    If so, then revisit the formula you have on your display mode property of the textbox and make sure that it is as we mentioned before. Based on the formula you sited, it should be If(ThisItem.StudentID in colPins.ID, Edit, View)

     

    And also, you mention a submit button...this is the first to hear of that.  In the submit button, you should clear the colPins collection Clear(colPins)  That will reset them all back.

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @omi18 :

    Could you tell me:

    • Which of the following situations is more in line with your needs?

    Case1:

    46.gif

    Case2:

    47.gif

    • what is  '[discount].[TotalTuitionDiscount]''s primary key ?

    Case1:

    This function can be solved in one step (no need to set pin).I've made a test for your reference:

    1\Creart a gallery(Gallery1) and add a pin ito this gallery

    2\Add a label control into this gallery and set it's Visible proeprty to:

     

    ThisItem.Primarykey=Gallery1.Selected.Primarykey

     

    Case2:

    I suggest you add a field named "Pin" (data type is boolean/default value is false) in'[discount].[TotalTuitionDiscount]'.

    1\Set the Pin's OnSelect property to:

     

    Select(Parent);Patch('[discount].[TotalTuitionDiscount]',ThisItem,{Pin:true})

     

    2\Set the label control's Visible proeprty to:

     

    ThisItem.Pin

     

    Best Regards,

    Bof

     

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 325 Most Valuable Professional

#2
11manish Profile Picture

11manish 165

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 88 Super User 2026 Season 1

Last 30 days Overall leaderboard