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

Create a collection from sharepoint list with choice column

Hi, I have searched for two day and tried all solutions I came over but I can't get it to work.

I have one Sharepoint list, from that list I want to create a collection from two columns.

Column 1 = Title = a text column contains name.

Column 2 = A choice column = text format, 3 possible choices.

 

I like the collection to look like this:

Column1 II Column 2

Name.     II text value

 

I tried this.

Clear(colInn);;ForAll(Sharepointlistname;Collect(colInn; {'Choice column name'.Value}))

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @FelipePanza,

to access the values within the nested table, you could use the "ForAll()" function:

ForAll(colList.MultiChoice,'Multi Choice'.Value)

This will create a table with only the values from your choice column:

Image 1.pngImage 2.png

If you want to check if the value exists in the collection, you can just add an "if()" function, if someone clicks on the button:

If(TextInput2.Text in ForAll(colList.MultiChoice,'Multi Choice'.Value),"true","false")

 

Hope this will help you!

Best regards
Marvin

If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.

View solution in original post

3 REPLIES 3
MarvinBangert
Solution Supplier
Solution Supplier

Hi @FelipePanza 

you can just combine "ClearCollect" with "ShowColumns":

ClearCollect(collnn,ShowColumns(SharePointListName,"Column1","Column2"))

I hope this helps you!

 

Best regards
Marvin

If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.

Thanks, the name for column2 had a space so that is was giving me problems. But as you can see inn the picture column 2 (here to the right) is a choice column and the value do not show. I want to use this collection to check if the personname exist before submit the new form. 

Skjermbilde 2021-04-05 kl. 16.31.37.png

Hi @FelipePanza,

to access the values within the nested table, you could use the "ForAll()" function:

ForAll(colList.MultiChoice,'Multi Choice'.Value)

This will create a table with only the values from your choice column:

Image 1.pngImage 2.png

If you want to check if the value exists in the collection, you can just add an "if()" function, if someone clicks on the button:

If(TextInput2.Text in ForAll(colList.MultiChoice,'Multi Choice'.Value),"true","false")

 

Hope this will help you!

Best regards
Marvin

If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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 (822)