cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
duncant
Level: Powered On

Pull Lookup Value

I am attempting to pull data from an Entity create (create a csv report for one of my parameters, which is a lookup value, I would like to display this value in the report, but instead of the value I am given a long string of letters and numbers.  How can I pull the value that is display in the entity?

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Pull Lookup Value

Hi @duncant 

In order to retrieve the values you want from the Cruise entity you will need to fetch them using the ID that you already have access to. You can do this by inserting a new Get Record action (CDS Connector) into your Flow and setting the Item Identifier value to the Dynamic Property that contains the ID. The output of this Get Record action will provide you with the values you require which you will then need to add into your CSV file.

Alternatively, you may be able to expand your initial Query to return the fields required from the related entity. More information on expanding queries can be found here https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/webapi/retrieve-related-ent...

 

 


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Follow me on Twitter at @QG_LeeJHarris

Or on LinkedIn at in/leejharris

View solution in original post

6 REPLIES 6
Power Automate Staff JatinSanghvi
Power Automate Staff

Re: Pull Lookup Value

@duncant Can you add more details to the question? Which connector and trigger did you select in the Flow? An example of what you expect and instead receive along with a screenshot will help us understand the issue and assist you.

duncant
Level: Powered On

Re: Pull Lookup Value

I am using CDS as my connector.  

 

If you see in the image below, you will notice that the _crd0c_cruiseid_value gives a long string, instead of the auto-number value setup when I created the entity.  I would like to get the ID as well as the name or title of the value. 

 

The csv should be seen as followed:

PassengerName,CruiseID,Age,CruiseTypeID
Andy,0001,16, 4-day

Wilma, 0002, 36, 5-day

Ginger, 0003, 54, 7-day

Jewel, 0004, 45, 4-day

  

lookup value.PNG

 

Highlighted
Power Automate Staff JatinSanghvi
Power Automate Staff

Re: Pull Lookup Value

@duncant , what values of 'crd0c_cruiseid' attribute do you see for those entities on the CDS application? I suspect this to be a problem with defining the custom entity/attribute within CDS. You should be able to create a new entity directly on CDS to confirm.

As far as know, the entity attribute that is used as primary key is always a GUID in CDS (I may be wrong). Are you sure that the 'auto-number' property is set on the 'crd0c_cruiseid' attribute and not on some different one?

Super User
Super User

Re: Pull Lookup Value

Hi @duncant 

In order to retrieve the values you want from the Cruise entity you will need to fetch them using the ID that you already have access to. You can do this by inserting a new Get Record action (CDS Connector) into your Flow and setting the Item Identifier value to the Dynamic Property that contains the ID. The output of this Get Record action will provide you with the values you require which you will then need to add into your CSV file.

Alternatively, you may be able to expand your initial Query to return the fields required from the related entity. More information on expanding queries can be found here https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/webapi/retrieve-related-ent...

 

 


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Follow me on Twitter at @QG_LeeJHarris

Or on LinkedIn at in/leejharris

View solution in original post

duncant
Level: Powered On

Re: Pull Lookup Value

Could you please go into detail on grabbing the lookup value within the flow?

Super User
Super User

Re: Pull Lookup Value

Hi @duncant 

You will need to make use of the Get Record action and request the record from CDS using the Id that you already have. The screenshot below shows a Flow that is fetching a list of Contacts from CDS and then for each one (in the Apply to Each loop) fetching the associated Parent Account using a Get Record action. You can see in the output of the Compose action that the company name from the List Records action is the Guid whereas the Name from the Get Record action is the text value.

 

chrome_2019-12-04_17-07-49.pngFlow setup with List action and Get Record action

 

chrome_2019-12-04_17-07-30.pngCompose action output

 

Hope this helps.

 


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Follow me on Twitter at @QG_LeeJHarris

Or on LinkedIn at in/leejharris

Helpful resources

Announcements
firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Users online (5,062)