cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PowerAppNoob
Helper I
Helper I

Auto Hide Gallery Item after Form Submission

Hi All,

 

I have a gallery which i use to populate data in a form. This is what I want to achieve:

 

PowerAppNoob_0-1613095350577.png

1. I select  Item 1 in the gallery.

2. The upper part of form gets populated with data coming from Sharepoint List.

3. User edits the lower part of the form.

4. Once done, user clicks the submit button.

5. Item 1 in the gallery disappears and gallery shows the 'unprocessed items' until all items have been processed and submitted.

 

I was able to achieve Steps 1 to 4 but I'm can't find a way on how to do Step 5. Any help will be much appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @PowerAppNoob :

 1\Just add a 'Single line of text' column named 'Status',and set it's default value to "unprocessed".Something like:

1.JPG

2\Add a gallery(Gallery8) and set it's items property to:

Filter(YourSpList,Status<>"Finish")

3\Set the submit button's OnSelelct property to:

Your original formula;/*Patch or SubmitForm*/
Patch(GalleryList,Gallery8.Selected,{Status:"Finish"})

Best Regards,

Bof

 

View solution in original post

4 REPLIES 4
v-bofeng-msft
Community Support
Community Support

Hi @PowerAppNoob :

I suggest you add a column to the gallery's data source to mark the submitted records.For example:

1\My data souce:

ClearCollect(GalleryList,{Title:"1",Status:"unprocessed"},{Title:"2",Status:"unprocessed"},{Title:"3",Status:"unprocessed"},{Title:"4",Status:"unprocessed"})

2\Add a gallery(Gallery8) and set it's items property to:

Filter(GalleryList,Status="unprocessed")

3\Set the submit button's OnSelelct property to:

Your original formula;/*Patch or SubmitForm*/
Patch(GalleryList,Gallery8.Selected,{Status:"Finish"})

71.gif 

Best Regards,

Bof

Hi @v-bofeng-msft ,

 

This is exactly what i want to achieve. However, as what you may have noticed in my username, i'm still a nood. 😂

 

When you say "add a column to the gallery's data source", you're saying to add a column in my SP list? And what would info should the column contain?

 

Thanks in advance!

Hi @PowerAppNoob :

 1\Just add a 'Single line of text' column named 'Status',and set it's default value to "unprocessed".Something like:

1.JPG

2\Add a gallery(Gallery8) and set it's items property to:

Filter(YourSpList,Status<>"Finish")

3\Set the submit button's OnSelelct property to:

Your original formula;/*Patch or SubmitForm*/
Patch(GalleryList,Gallery8.Selected,{Status:"Finish"})

Best Regards,

Bof

 

It worked! Thank you so much! I'm happy my app is starting to be in shape. 😁

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (3,148)