cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CParker
Advocate I
Advocate I

Using CDS (ce) List as a lookup against another CDS (ce) List

Hi All,

 

Scenario (short version)

I have two arrays, both sourced from D365 via CDS (ce) lists.

  1. varQuickCampCandEmailAdd - contains a list of unique email addresses

CParker_2-1597020851185.png 

2. varAllCandEmails - contains a separate list of email address and Candidate GUIDs

CParker_3-1597020920975.png

 

Goal:

I would like search varAllCandEmails for email addresses, that match those stored in varQuickCampCandEmailAdd, and then extract the corresponding Candidate GUID.

 

Can anyone assist me in achieving my goal?

1 ACCEPTED SOLUTION

Accepted Solutions
Mira_Ghaly
Dual Super User
Dual Super User

Hi @CParker 

I have simulated your logic at my side , find the details below:

your first array as below

Mira_Ghaly_0-1597025992161.png

Second Array as below:

Mira_Ghaly_1-1597026028247.png

Initialize new array to hold candidates IDs as below:

Mira_Ghaly_2-1597026073357.png

Then i made a new Apply_to_each loop that loops on your second array the one with email and IDs and a compose action that set the Email from your second array as below:

Mira_Ghaly_3-1597026145884.png

Inside the first Loop , i made another loop to loop and the first array and compare every item against the Second Array as below:

I made another compose data operation that holds the email for the first array Loop name 'Apply_to_each_2'

 

Mira_Ghaly_4-1597026238576.png

Then a condition Expression to compare the outputs of the 2 compose Data Operation Steps as below , if they match i insert record to the Candidates GUID array as below

Mira_Ghaly_5-1597026313274.png

 

Mira_Ghaly_6-1597026343615.png

 

and then i printed the output of the candidate array to a compose to test and it worked as expected:

Mira_Ghaly_7-1597026412331.png

 

 

 

 

 

If this post helps you with your problem, please mark your as Accepted solution.

If you like my response, please give it a Thumbs Up.

MG (Naturally Curious)

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

View solution in original post

2 REPLIES 2
Mira_Ghaly
Dual Super User
Dual Super User

Hi @CParker 

I have simulated your logic at my side , find the details below:

your first array as below

Mira_Ghaly_0-1597025992161.png

Second Array as below:

Mira_Ghaly_1-1597026028247.png

Initialize new array to hold candidates IDs as below:

Mira_Ghaly_2-1597026073357.png

Then i made a new Apply_to_each loop that loops on your second array the one with email and IDs and a compose action that set the Email from your second array as below:

Mira_Ghaly_3-1597026145884.png

Inside the first Loop , i made another loop to loop and the first array and compare every item against the Second Array as below:

I made another compose data operation that holds the email for the first array Loop name 'Apply_to_each_2'

 

Mira_Ghaly_4-1597026238576.png

Then a condition Expression to compare the outputs of the 2 compose Data Operation Steps as below , if they match i insert record to the Candidates GUID array as below

Mira_Ghaly_5-1597026313274.png

 

Mira_Ghaly_6-1597026343615.png

 

and then i printed the output of the candidate array to a compose to test and it worked as expected:

Mira_Ghaly_7-1597026412331.png

 

 

 

 

 

If this post helps you with your problem, please mark your as Accepted solution.

If you like my response, please give it a Thumbs Up.

MG (Naturally Curious)

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

thanks @Mira_Ghaly ! It worked great 🙂

There is another step I have to clean the ; out of the email addresses in varQuickCampCandEmailAdd; see below (note - I removed this variable from my flow). 

CParker_1-1597644231873.png

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022- Season 2 has kicked off!

Users online (3,092)