cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ChenYung
Regular Visitor

Entities/Tables relationship design/setup question

Hi,
The CDS entities designed as below:

TableCustom fieldRelationshipE.g.
Users (Default)GroupPolicy as Text  
GroupPolicy  A, B, C, D, E, F
Request RequestType as LookupN-1(RequestType) 
RequestTypeWorkflow as Lookup1-N (Workflow) 
WorkflowReviewer as Lookup
Approver as Lookup
N-N (GroupPolicy)
N-N (GroupPolicy)
B,C,D
E,F

Questions
1. Is it possible to store 'Record' for the field/column of Lookup type?
2. If (1) is do-able, please advise how to set a collection (in Canvas) for 'Request' that will join the related entities, RequestType > Workflow to get the both Reviewer and Approver (as GroupPolicy)?

Regards,

CY

2 REPLIES 2
jlindstrom
Super User
Super User

So if I understand, you want to store both the lookup value as well as the text value of the selected record in a lookup. Is there a reason you need to do this?

If I have a lookup to another entity table, I can use dot notation to get the text value of the lookup record. For example

ThisItem.Customer.Name

 will get the name field from a customer lookup on order table.

 

For working with N:N related records, you could use Power Automate flow to get the records, or see @nickdoelman  blog post https://readyxrm.blog/2020/09/04/how-to-implement-a-common-data-service-many-to-many-field-on-canvas...

 

If you need to do this for some other reason, you could patch the value to a text field when a record is created from a canvas app, or what I like to do is use a real time workflow that runs on update of the lookup field and updates a text field.

Hi, Good day.
I understand you said about the dot notation to get the text value. My question about the Reviewer field (same with Approver field) which is a lookup field to "GroupPolicy" Table. Is it possible to store a record of Lookup (multiple looup values)?  Example Reviewer consists of GroupPolicy B, GroupPolicy C, GroupPolicy D and Approver has [GroupPolicy E, GroupPolicy F]

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,301)