|Power Automate Flow,Azure Dev Ops,Dynamics 365 CI/CD Pipeline

Power Automate Flow - Option Sets Formatted Values

I had this scenario where I needed to access the label of option sets. Previously in the old CDS connector, we were able to simply append something like this _label to our field and voila! With the newest flavour of Dataverse connectors, we now need to change our approach.

We have this flow below.

Power Automate Flow

In order to best get at those option set labels, I ended up using this


Thats basically it. You may want to include some null checks too, something like this will work.

if(empty(outputs('Get_the_related_Opportunity')?\['body/expectedcommencementdate']),'Not Available',outputs('Get_the_related_Opportunity')?\['body/expectedcommencementdate'])

What we're doing here is saying, if the output from Gettherelated_Opportunity is empty, replace the string with 'Not Available' otherwise use the value contained in the string. You of course could replace the 'Not Available' string with anything you like really.

© Copyright 2021 All rights reserved.