cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Finkbeiner
Regular Visitor

Calculated Field use string value of collumn type Picklist

I have a calculated text field in a model driven app which should be calculated from the value of an optionset in the same entity and string literal.
I would asume the syntax would be like this: CONCAT(<optionsetfieldname>, "literal")
But i get the following error: 
You cannot set the value cr4b7_locationtype of type picklist to type string
 

How can I convert the optionset to a string that it can be used in the CONCAT function?

2020-12-14 14_42_17-Berechnetes Feld – Standortbezeichnung - Microsoft Dynamics 365 - Work - Microso.png
Thanks and best regards
Alexander 
7 REPLIES 7
FrostedFlake
Resolver I
Resolver I

I dont know the type picklist, but here are my thougts:

Convert something to text with Text(varToConvert)

 

I think you can't convert a picklist into a String (but try it anyway!), because it contains multiple records of something. Try to filter your picklist with the following:

Filter(yourPickinglist, fieldToFilterOn="valueToFilterOn")

 

Good Luck!

 

 

Thanks! I tried this already, but without success. It is saying "Function TEXT is not existing". 

The picklist is a "Option" and I need the value which is selected.

 

I think actions in calculated field are limited to the fuctions listed here: Define calculated fields | Microsoft Docs

Has anyone else any idea? Or is it just not possible? 

Try this:

Text(yourOptionField.Selected.Value)

This will get the choosen value of your option field.

Let me know if this worked for you (:

Thanks, but this ends in following error: "the formula contains an invalid reference:."2020-12-14 17_16_04-Berechnetes Feld – Standortbezeichnung - Microsoft Dynamics 365 - Work - Microso.png

 

FrostedFlake
Resolver I
Resolver I

Did you try cr4b7_locationtype.Selected.Value ?

Finkbeiner
Regular Visitor

Yes, but same error:  "the formula contains an invalid reference:."

Finkbeiner
Regular Visitor

With JS I would access the value of the optionset with getText(). But this function is also not known in this context

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (5,242)