Showing results for 
Search instead for 
Did you mean: 
Advocate IV
Advocate IV

How to use Option Sets columns inside a Calculated text field?

Since I cannot find anything online, I'm hoping to tap into expert knowledge here...


I have a single entity with 3 options set columns in CDS, namely, Grade level, Genre, Format with their own internal IDs.



My goal is to have a text field with the concatenated corresponding label values such as (3 Writing Online) and not (100,003, 100,008, 100,010).  


In the calculated form, the intellisense doesn't even show the options sets 😞


Any tips or example would be appreciated...

Kudo Kingpin
Kudo Kingpin

Easy with JavaScript. I wrote a function for you. You have to change the attribute names below to reflect your attributes.

You can call this function on the on-change event of the three option set attributes (adding the event handler). If you don't know how to upload JS & add an event handler, steps are described here:




function ConcatLabels(executionContext) {
    var formContext = executionContext.getFormContext();    

    var gradeLabel= formContext.getAttribute("your_attribute_logical_name").getText();
    var genreLabel= formContext.getAttribute("your_attribute_logical_name").getText();
    var formatLabel= formContext.getAttribute("your_attribute_logical_name").getText();

var finalString = gradeLabel + genreLabel + formatLabel; // you can format your string here

//set the finalString to your attribute







Please mark it as answer if my code helps.


Satish Reddy


Super User
Super User


If you want a no-code approach then you can use CDS classic workflow. Trigger the workflow on change of your option set fields and use it to populate a text field that are the option set fields concatenated.

Details on classic CDS workflows are here

Let me know if you need anymore help with this option.

Note, for the JavaScript solution provided previously. You might find that the onload trigger of the code will probably not work for you. You will need to trigger it on the onchange event of your option set fields.

@HSheild  I second that. The handler has to be added on on-change events, not on-load. I am editing my post.

Helpful resources

Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Users online (4,195)