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

read each selected item in a SharePoint multi choice dropdown

I have a need where the user selects one or more items in a Sharepoint multi select field.  I need the text of each item so I can dynamically add the texts to a search string for Item1 or Item2 or ItemX.

 

I have the values in a table from the data card.  ChoiceFieldDataCard.SelectedItems.Value

 

I can get the first Item First(ChoiceFieldDataCard.SelectedItems).Vaue and of course I can get the last item.  PowerApps doesn't have an index so finding the second or Xth item is hard to read.

 

Is this possible without displaying the table in a hidden gallery and then inspecting each item in the gallery?

1 ACCEPTED SOLUTION

Accepted Solutions
v-siky-msft
Community Support
Community Support

Hi @DDucolonSBUX ,

 

Your needs may be implemented by combo of FirstN() function and Last() function. For example, try with the following code to get the third item.

 

Last(FirstN(ChoiceFieldDataCard.SelectedItems,3)).Vaue

 

Hope this helps.

Sik

View solution in original post

2 REPLIES 2
KranthiTupakula
Responsive Resident
Responsive Resident

Please make use of the forall function

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-forall

 

 

_________________

If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

v-siky-msft
Community Support
Community Support

Hi @DDucolonSBUX ,

 

Your needs may be implemented by combo of FirstN() function and Last() function. For example, try with the following code to get the third item.

 

Last(FirstN(ChoiceFieldDataCard.SelectedItems,3)).Vaue

 

Hope this helps.

Sik

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 (1,033)