cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Canvas App with multiple CDS Entities

Hi,
I am very new to PowerApps. Following is my requirement.

Create a workflow system with multiple approvals and I am planning to use CDS.
Each request has a running number as the id. Each request have multiple level of approvals(eg: 4 level)

Do I need to have,
a) A primary  entity which have the information about the request, ie, request number, request details etc.

b) Multiple related entity for with request number, approver  details, status, data/time stamp, other fields. I need to have 4 such entity for approver 1, approver 2, approver 3 and approver 4?

The reason I believe, I need to have multiple CDS entities for each approval is because any one approver reject or push the workflow to rework. Then the workflow has to push back to the previous approver. Hence I believe need to capture the entire history/audit log of each transactions by each approver at various stages of workflow.

Can you help me know how can I  achieve this? In a conventional java/.net application I can create multiple tables in sql database and can link these tables via primary key/foreign keys.

Hence my question will be, do I need to create
a) Project Entity, Approver 1 Entity, Approver 2 Entity, Approver 3 Entity ,Approver 4 Entity? If so, will CDS Relationship  will help to make the application data source simpler?Something like one-to-many mapping? Because I need to link the data with the unique request number across entities? or
b)  Single Entity is required to design the whole application and I need to use filter out the gallery based on some criteria?

Please excuse me if I am asking a wrong question or I am totally wrong in understanding the CDS concept as I am new to powerapps.

1 ACCEPTED SOLUTION

Accepted Solutions
SeanHenderson
Power Participant
Power Participant

Hi @Anonymous 

Let's try to unpack this a little bit.

a) So you have a form with various details. So far we are at 1 entity for the form, we will call it entityMain. If you want to add more entities, ask yourself, is there anything this form will look up that should have it's own entity? For example, maybe you have 3 departments. If all the information for those 3 departments is the name, maybe you just want an option set on entityMain. But maybe departments have their own list of attributes you want to capture, in which case you would make a Departments entity and have a Lookup field to it on entityMain. So, again, is there anything on entityMain that it will need to look up to?

 

b) This all depends on your workflow, but I don't see why you should have multiple entities for each approver. Why not have 4 screens, one for each approver? And capture the approval/rejection of each one in the same record on entityMain, along with any comments/details the approver or rejecter (is that a word...?) might want to include.

 

So for one record on entityMain, the app would collect:

Screen1: Record details

Screen2: Approver 1 details

...

Screen4 Approver 4 details

 

You could even stage gate the screens so that each one only opens up when the previous one has been approved.

I have made approval workflows like this before and I'd be happy to assist on it.

View solution in original post

1 REPLY 1
SeanHenderson
Power Participant
Power Participant

Hi @Anonymous 

Let's try to unpack this a little bit.

a) So you have a form with various details. So far we are at 1 entity for the form, we will call it entityMain. If you want to add more entities, ask yourself, is there anything this form will look up that should have it's own entity? For example, maybe you have 3 departments. If all the information for those 3 departments is the name, maybe you just want an option set on entityMain. But maybe departments have their own list of attributes you want to capture, in which case you would make a Departments entity and have a Lookup field to it on entityMain. So, again, is there anything on entityMain that it will need to look up to?

 

b) This all depends on your workflow, but I don't see why you should have multiple entities for each approver. Why not have 4 screens, one for each approver? And capture the approval/rejection of each one in the same record on entityMain, along with any comments/details the approver or rejecter (is that a word...?) might want to include.

 

So for one record on entityMain, the app would collect:

Screen1: Record details

Screen2: Approver 1 details

...

Screen4 Approver 4 details

 

You could even stage gate the screens so that each one only opens up when the previous one has been approved.

I have made approval workflows like this before and I'd be happy to assist on it.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (1,319)