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 III
Super User III

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

PA Community Call

Power Apps Community Call

Next call is happening on April 21st at 8a PST.

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (61,331)