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

Help please with retrieving/storing from SP Choices List

Hello all!

Please may I ask for some help...

Building an app that our employees will use to identify their skills that should store their selections in a SP List against their name (ideally all skills in one column).

The users should be able to come back to the app and see the selections they have made and either add new ones or remove existing selection.

 

1) Have a sharepoint list with a list of 50 entries (skills)

2) Have a 2nd SP list that stores the results of Submit (have also created a Choice column in this list with all the entries in SP List 1 but not using it at the mo)

2) Have a gallery with Items property set to the list name (works fine, all items in the list are showing) and Collection created when clicking the arrow next to each item

3) Have a 2nd Gallery connected to the Collection so that when an item in Gallery 1 is selected, it populates in the 2nd Gallery.

 

I would like that Onselect of the submit button, the values selected in Gallery 2 are written back to a single column against the user that made the submission.

 

I have this in OnSelect: 
ForAll(Gallery2_1.AllItems, Patch(' Capability Inventory', Defaults('Capability Inventory'), Form4.Updates, {Choices:Label8_1.Text}))

 

Form4 in the formula is a form on the home screen that grabs logged in user name, their email, Line Manager etc.

 

The current result is that mutilple items are created in the SP list (one line in SP per each entry in Gallery 2) against the user that submitted it.

Have added some screenshots that will explain it.

Thank you in advance for any advice you can give me 🙂

 

SP List showing selected items in Gallery 2 after Patch...one entry for each item submitted bu the logged in userSP List showing selected items in Gallery 2 after Patch...one entry for each item submitted bu the logged in userSelected items FROM gallery 1 INTO Gallery2Selected items FROM gallery 1 INTO Gallery2Entries created in SP List; one for each item in Gallery 2 against the name of the user that submittedEntries created in SP List; one for each item in Gallery 2 against the name of the user that submitted

5 REPLIES 5
CNT
Community Champion
Community Champion

@marney The following formula will save one record per submission with the skills saved as a comma separated list.

Patch(' Capability Inventory', Defaults('Capability Inventory'), Form4.Updates, {Choices:Concat(Gallery2_1.AllItems, Label8_1.Text, ", ")})
marney
Frequent Visitor

Thank you so much mate, that worked perfectly however I realise that capturing the skills in this way wont allow us to go back to the app, select a skill (in a gallery) and see who has selected that skill...and thats really the point of the app to 1) Capture the skills against all employees and 2) provide us with the functionality to highlight a skill and see who has it.

 

Once again, any advice would be massively appreciated!

CNT
Community Champion
Community Champion

@marney Create a LookUp Column with Allow Multiple Values. This way you can store multiple Skills for an Employee in a single record and also retrieve it however you want.

 

CNT_0-1623666990777.png

 

marney
Frequent Visitor

Thank you my friend! Would I then update the code to:

 

Patch(' Capability Inventory', Defaults('Capability Inventory'), Form4.Updates, {'EMPLOYEE SKILLS':Concat(Gallery2_1.AllItems, Label8_1.Text, ", ")})

 

?

Thanks again

CNT
Community Champion
Community Champion

@marney Nope! Do this (replace yourSkillsComboBox with the actual name),

 

Patch('Capability Inventory', Defaults('Capability Inventory'), Form4.Updates, {'Employee Skills': yourSkillsComboBox.SelectedItems})

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

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

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