web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Building a joined coll...
Power Apps
Unanswered

Building a joined collection from Flow Approval entities

(0) ShareShare
ReportReport
Posted on by 170 Most Valuable Professional

Hi all!

 

I have a problem I totally don't understand. I am trying to create a collection built from joining two entities in CDS: Approvals and Approval Requests. To do that I want to use column called: Approval Id Index.

 

When application starts I clearcollect both entities to ApprovalsList and ApprovalRequests collections.

 

Now I want to create a third one, that has all columns from ApprovalRequests + three columns from ApprovalsList: Title, Completed On and Status Reason. For that reason I created this expression:

 

ClearCollect(
 AllTasks,
 AddColumns(
 ApprovalRequests,
 "StatusReason",
 LookUp(
 ApprovalsList,
 'Approval Id Index' = ApprovalRequests[@'Approval Id Index'],
 'Status Reason'
 ),
 "TaskTitle",
 LookUp(
 ApprovalsList,
 'Approval Id Index' = ApprovalRequests[@'Approval Id Index'],
 Title
 ),
 "TaskCompletedOn",
 LookUp(
 ApprovalsList,
 'Approval Id Index' = ApprovalRequests[@'Approval Id Index'],
 'Completed On'
 )
 )
);

But although, when I output column Approval Id Index from ApprovalRequests I see that for each row the value is different, the JOIN gives me the same information from Approvals for every joined row.. So in each row in AllTasks collection I'm having the same Title, Status Reason and Completed On values. Why is that happening? What am I missing?

 

Any help appreciated.

 

Regards,

Tomasz

I have the same question (0)
  • mike528 Profile Picture
    236 on at

    Tomasz,

     

    Have you tried creating the data with the columns you need as a view in CDS and then simply loading your collection with that view within PowerApps?

     

    Thanks, Michael

  • TomaszPoszytek Profile Picture
    170 Most Valuable Professional on at

    Hi Mike!

    That indeed sounds like a good idea, however I cannot create a view in "Approval Requests" entity. Maybe that is possible just for custom?

     

    Can you?

     

    Regards,

    Tomasz

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 802 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 332 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 273

Last 30 days Overall leaderboard