cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JakobDahl
Helper I
Helper I

Convert dropdown list from sharepoint to string

Hello everyone,

 

I have a DataCardValue which datatype is "Complex" a.k.a a dropdown list so the datacard has multiple values, and this isn't a allowed type only: Text, Number, Booleans and OptionSetValues are allowed

datatype.png
What is the easiest way to convert all the choices from the dropdown list to string?

 

Kind Regards

Jakob Dahl

 

3 REPLIES 3
v-yamao-msft
Community Support
Community Support

Hi @JakobDahl ,

 

To convert the value of a choice filed into text, please try if the following way will work for you.

Review Status is of type Choice in SharePoint list, unlock the Review Status data card, then add a Label control within the card, entering the following code in the Text property of the Lable:

If(DataCardValue17.Selected.Value="aa","aa",If(DataCardValue17.Selected.Value="bb","bb"))

1.PNG

Hope it could be a reference for you.

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I almost thought this solved my problem, but the thing is that my"choice filled" DataCardValue has multiple choices selected, so i want to list all the "SelectedItems" in one text label. 

How would i go about doing this? Smiley Very Happy

Kind Regards

Jakob Dahl

cbristol
Frequent Visitor

First set a variable "StringVar" with a Concat function of each selection. Include a delimiter in quotes to separate the choices. This occurs "On Change" of the drop down field

Set(StringVar,Concat(DataCardValue41.SelectedItems,Value,"; "))

Then set your text box Default to StringVar

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,034)