cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Removing an Item from a Gallery

Hello,

Building a gallery that contains items for review. Once the item is clicked it goes to a detail screen where the reviewer reviews the info, providing some feedback that is collected in a sharepoint list, and then clicks a complete button that returns them to the main gallery. Ideally, multiple people would be working the gallery and reviewing the items. I would like to remove an item from the gallery once it is clicked to avoid multiple people reviewing the same item. I tried removing onselect of the item using Remove(Table1_3, ThisItem), this worked BUT some of the information from the gallery item transfers to the detail screen and it gets automatically deleted before it can be reviewed/completed. So, I'd like to change the removal to the complete button on the detail screen but I'm getting an error. Have tried everything, any help would be greatly appreciated, thank you in advance! Any alternate suggestions, like how to get a field to remain a different color or remove part of the gallery listing, anything to denote to others that it has been worked, would be great too! 

 

Formula I am using: 

Remove(Table1_3, 'VIN LIst'.Selected)

    -Table1_3 being my data source and VIN List being my gallery

 

Error message I am receiving: 

jmcelvoysemen_0-1598023987951.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @jmcelvoysemen ,

 

@krishnags 's suggestion is excellent, but if your issue hasn't been resolved, I'm glad to help further.

 

After the Yes/No column 'Reviewed' has been created, refresh the SharePoint connection in PowerApps.

The next step is to assign the Reviewed column to true when the complete button is clicked to return data. If you use SubmitForm(FormName) function to save the form data to sharepoint list, try to Add 'Reviewed' colunm to the Form, and set Update property of Data Card to true, and Set the Visible property of Data Card to false to hide this field in Form. Then after the form is Submitted, the Reviewed column is automatically assigned with true value.

 

The last step is to filter the Gallery to only display the items that Reviewed Column is false to avoid reviewing the same items. Set Gallery.Items property as follows.

Filter(Table1_3, Reviewed=false)

 

Hope this helps.

Sik

View solution in original post

7 REPLIES 7
Super User
Super User

@jmcelvoysemen  Remove - is a function which deletes the record from the data source. If you want to hide the data which is reviewed and feedback provided, try creating a field [Reviewed -Yes or No]. Once any user provided feedback, along with the feedback update the flag to "Yes" and refresh the gallery to show only the records with Reviewed = No

@krishnags Thanks for the reply! I'm new to powerapps and still learning so excuse my ignorance if some of these are silly questions but can you "add a field" outside of a form? I hadn't used a Form to collect the data instead, I just have text entry boxes and toggles, the info entered into these goes into a sharepoint list. I'm also not sure what you mean when you say "update the flag," could you possibly elaborate a little?

 

Thank you again!!

@jmcelvoysemen whenever we have requirement to perform actions on a record based on a condition - usually we create field in the database side (in your case SP List) of Boolean type. Based on it's value we perform our actions.

 

  1. So, you may need to create Boolean field in your SP List
  2. add this to the form but hide it
  3. When a feedback submitted to a record - change this Boolean value to "YES" and refresh your SP List
  4. When you are loading the Gallery Items - Load the records with the flag value set to "NO"
  5. so,  gallery will have only records which are not feedback provided.

@krishnags Thank you, thank you! This explanation clicked for me and now it makes sense. I believe I'll be able to do this. Giving it a try now. 

@krishnags This makes sense but I'm coming up blank on which formula to use here onselect. I'm trying "update", but that is asking for the data table and then the row? Not the yes/no question I added and hid? Thank you again!!

Hi @jmcelvoysemen ,

 

@krishnags 's suggestion is excellent, but if your issue hasn't been resolved, I'm glad to help further.

 

After the Yes/No column 'Reviewed' has been created, refresh the SharePoint connection in PowerApps.

The next step is to assign the Reviewed column to true when the complete button is clicked to return data. If you use SubmitForm(FormName) function to save the form data to sharepoint list, try to Add 'Reviewed' colunm to the Form, and set Update property of Data Card to true, and Set the Visible property of Data Card to false to hide this field in Form. Then after the form is Submitted, the Reviewed column is automatically assigned with true value.

 

The last step is to filter the Gallery to only display the items that Reviewed Column is false to avoid reviewing the same items. Set Gallery.Items property as follows.

Filter(Table1_3, Reviewed=false)

 

Hope this helps.

Sik

View solution in original post

Thank you! I hadn't figured it out yet so I really appreciate this response. Will be trying this today! Thank you again!!

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (64,415)