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
New Member

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

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.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors
Users online (2,246)