Posts

Showing posts with the label Power Automate

Get Lookup / Power Automate text value instead of guid / integer values using Power Automate

Image
Problem Statement In Power Automate flows, I was getting GUID for lookup and integer for optionset fields instead of text values for both fields.  Example For a contact records below from CRM, I've Account Name as lookup field and Preferred Method of Contact an optionset field. Solution To get face values for lookup as well as for optionset, you need to use below expressions body('SourceDataSet')?['<FieldName>@OData.Community.Display.V1.FormattedValue'] SourceDataSet - the dataset from where you are trying to get face values for optionset and lookup Field Name - logical field name;  In our case, source data set is "GetContact" while below are fields Preferred Method of Contact - preferredcontactmethodcode Account Name (lookup field) - _parentcustomerid_value So as par above expression, let complete our expression and put in Power Automate Flows Compose component. For Optionset,  body('GetContact')?['preferredcontactmethodcode@OData.Commun...