cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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
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.

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
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 (90,655)