Hello all
Below is the end part of a flow that was proposed by a fellow community member (abm). The purpose of the flow is to assign a new Case to a Queue, upon creation of the Case. Part of this is to create and populate the Queue Item. The flow works well until it gets to the Create New Record (the Queue Item) section. It is seeking an Object for the Queue Item (I think!). There is nothing showing in the List Records section of the Dynamic Content. What is the Object it requires and where can it be found?
Solved! Go to Solution.
Hi Chris,
You will need an additional "Get a row" action after your trigger, then you can retrieve the lookup record's text value.
For your example, I have added the below steps to get the case owner:
1. Add a "Get a row" action where you get the created case (trigger)
2. Then do a compose to check your case owner using the below expression
outputs('Get_a_row_by_ID_(Get_the_created_Case)')?['body/_ownerid_value@OData.Community.Display.V1.FormattedValue']
Below is the raw output of "Get a row" action and this is where I got the code/expression from:
Similarly you can do for your "Customer" field in Cases: (using the expression below)
outputs('Get_a_row_by_ID_(Get_the_created_Case)')?['body/_customerid_value@OData.Community.Display.V1.FormattedValue']
Let me know how it goes.
You can also refer to Linn's blog below:
https://community.dynamics.com/365/b/linn-s-power-platform-notebook/posts/get-the-lookup-display-nam...
Thanks
Arjun
If this post helps, give a thumbs up and please consider marking it as a Solution to help other members.
@Chris_Craft Glad to know it helped you for the lookups.
For choices (optionset) you can do like below:
In my example, I am showing the expression that should be used for Case's origin field (OOB).
caseorigincode@OData.Community.Display.V1.FormattedValue
Similarly you can find your choices field in a flow run and get the expression from there.
Thanks
Arjun
If this reply helps, give a thumbs up to help other members.
Further to the issue below, I have sorted this. The Object it required was the Case (Incident) not the Queue Item. I should have spotted this from the Object Type field below it.
The flow is now updating the Queue Item in the relevant Case. However, it is mapping the guid id's to the Queue Item, not the textual values.
I have created 4 new fields in the Queue Item to map these values to from the Case but these fields do not appear in the available Dynamic Content. Any ideas?
Hi Chris,
You will need an additional "Get a row" action after your trigger, then you can retrieve the lookup record's text value.
For your example, I have added the below steps to get the case owner:
1. Add a "Get a row" action where you get the created case (trigger)
2. Then do a compose to check your case owner using the below expression
outputs('Get_a_row_by_ID_(Get_the_created_Case)')?['body/_ownerid_value@OData.Community.Display.V1.FormattedValue']
Below is the raw output of "Get a row" action and this is where I got the code/expression from:
Similarly you can do for your "Customer" field in Cases: (using the expression below)
outputs('Get_a_row_by_ID_(Get_the_created_Case)')?['body/_customerid_value@OData.Community.Display.V1.FormattedValue']
Let me know how it goes.
You can also refer to Linn's blog below:
https://community.dynamics.com/365/b/linn-s-power-platform-notebook/posts/get-the-lookup-display-nam...
Thanks
Arjun
If this post helps, give a thumbs up and please consider marking it as a Solution to help other members.
Hello Arjun
Many thanks for your response.
I have updated the flow as you suggested:
Once I save the flow, I get the following message:
Best regards
Chris
Hello Arjun
I have found the error. I pasted the link you supplied verbatim, I needed to modify that to map to my flow elements. I needed to remove the part "Get_the_created_Case)":
outputs('Get_a_row_by_ID_(Get_the_created_Case)')?['body/_customerid_value@OData.Community.Display.V1.FormattedValue']
outputs('Get_a_row_by_ID')?['body/_customerid_value@OData.Community.Display.V1.FormattedValue']
So having done that, and after finding a few other funnies such inadequate field lengths, I managed to get the Compose values to map to the new Queue Item record created by the flow.
In order to get the Compose outputs to map to the Queue Item, I needed to create separate Compose steps for each Queue Item field to be mapped (this is where the field length error started).
This now working fine with one exception, I cannot use the Compose step for non-lookup type fields. I have one other field which is a Choices type field (the old Options List). Whichever way I try to map that, it always displays the guid reference value and not the option selected from the list.
If you have any ideas on that one, they would be appreciated.
Chris
@Chris_Craft Glad to know it helped you for the lookups.
For choices (optionset) you can do like below:
In my example, I am showing the expression that should be used for Case's origin field (OOB).
caseorigincode@OData.Community.Display.V1.FormattedValue
Similarly you can find your choices field in a flow run and get the expression from there.
Thanks
Arjun
If this reply helps, give a thumbs up to help other members.
Thanks Arjun, that has worked perfectly. Many thanks for your help on this.
take care
Chris