cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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
Highlighted
Resident Rockstar
Resident Rockstar

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

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.

View solution in original post

2 REPLIES 2
Highlighted
Resident Rockstar
Resident Rockstar

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

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.

View solution in original post

Highlighted
Frequent Visitor

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

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (6,740)