cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AndrewValenzuel
Advocate II
Advocate II

Selected gallery item clears when I submit form

I've narrowed down the reason why my edit form is clearing when I submit.  The reason why is because my gallery is filtered based on the status of a ticket.  (the app is for service tickets btw).

 

When the gallery is set to filter out all tickets with a status of "closed", and I select and submit changes to a ticket with the status of "open", and set said ticket's status to "closed", the edit form clears all of the data.  

 

Is there a way where I can select a ticket based on another attribute other than TicketsGallery.Selected?  

 

Each ticket in the gallery has a unique ticket ID (the sharepoint ID column).  How can I select items in a gallery based on the ID instead of the edit form's default:  ITEM: TicketsGallery.Selected?

4 REPLIES 4
WarrenBelz
Super User
Super User

Hi @AndrewValenzuel ,

I assume the Status drop-down is not "connected" to any field in the gallery Items? If so, this is a known issue with unbound gallery controls resetting when something is done from or to the gallery.

If your Items are based on a Collection, use AddColumns to add a Text Field (I will call it ddText here) and on the OnChange of the DropDown, put this

Patch(
   YourCollectionName,
   ThisItem,
   {ddText:Self.Selected.Value}
)

then in the Default of the drop-down would then be

ThisItem.ddText

 

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.

 

Hi @AndrewValenzuel ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

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.

v-bofeng-msft
Community Support
Community Support

Hi @AndrewValenzuel :

Do you want to specify a record by ID instead of using TicketsGallery.Selected?

If so,please try:

LookUp(YourSharePointList,ID=1) /*I suppose to specify the item with ID=1*/

instead of

TicketsGallery.Selected

Best Regards,

Bof

Yes that is exactly what I want to do.  But my problem is that the gallery is filtered.  And when I submit a change to the item (suchas changing the status to "Closed") the filtered gallery no longer has that item in view, because the is filtered by the item's status: "Closed, Open, In-Progress, Canceled...".

 

I'll try this when I get the chance, thanks for your input.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,787)