
Hi,
I can't seem to get to the GUID to use a Lookup
I have a relationship. They are Sample Group and Sample Group Detail.
I am trying to get from Sample Group Detail to Sample Group using a Lookup.
When trying to do this I can't get to the GUID. I only see the "Sample Group" table. How can I get to the GUID.
I trying to get to the field "new_samplegroupid".
LookUp('Sample Groups', 'Sample Groups', GUID(txt_SearchOption))
To get the GUID on any CDS entity, use the GUID function: GUID(MyEntityName), don't use the logical name. just the Name of the Entity.
Have you set up a One to Many relationship between these two entities? if you have done, then use the lookup field in the "Sample Group Detail" entity. This is easy : GUID(ThisItem.'Your Lookup Field Name on Sample Group Detail '.'Sample Group')
If there is no relationship defined in CDS, then you need to use the Lookup function:
Lookup('Sample Group', GUID('Sample Group') = SelectedDetailRecord.GUID('Sample Group Detail') , GUID(Sample Group))
the last highlighted blue argument is optional. if you add it, it will only return the GUID column. if not, the entire record in 'Sample Group' will be returned.
--------------------------------------------------------------------
Please Accept as Solution if this post answered your question so other members can find it. If you found this post helpful consider giving my post a Thumbs Up!