cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
chenboly
Level: Powered On

How to check the result from Get Items

Hello,

I had 2 sharepoint list as below:

1- Master List with below column:

  • Employee Name

2- Request List

I have 3 different employee name registered in Master List.

I want to check if Created By Display Name (in Request List) is equal to Employee Name (in Master List) then send and Yes email.

The result that i get from Get Items is arrays and the condition perform is both Yes and No, so I received email from this condition is Yes and No email too.

The expression result is true, so it should send only one email from (If yes), but the problem is I recieved both email from (If Yes and If No

flow.PNG

 
1 ACCEPTED SOLUTION

Accepted Solutions
fchopo
Level 10

Re: How to check the result from Get Items

Hello @chenboly 

After retrieving the items from the SharePoint list, you could filter the results using filter array and then check the number of items (if equals to 1, then send the email). I attach an example:

Filter.pngHope it helps!

Ferran

View solution in original post

10 REPLIES 10
Super User
Super User

Re: How to check the result from Get Items

Hi @chenboly 

Can you share screen shot of your condition configuration please?

Thanks J

chenboly
Level: Powered On

Re: How to check the result from Get Items

here it is.

flow1.PNG

Super User
Super User

Re: How to check the result from Get Items

Hi @chenboly 

 

Could please post your expression formula and explain what you trying to do?

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



chenboly
Level: Powered On

Re: How to check the result from Get Items

sorry i post the wrong screen captured.

 

In my Master List having more then one record.

ID                  EmployeeName

1                    A

2                    B

3                    C

 

what i am trying to do is compare the CreatedBy DisplayName (from Leave Request Form List) to EmployeeName (in Master List), then if CreatedBy DisplayName = EmployeeName then the YES condition will send an email. but for this case, even the expression result is True, the email will send from both YES and NO. because the Get Items retrieve all the list from Master List, so I don't know how to make the condition stop when the expression is true.

 

please see the expression below:

1.PNG

Capture.PNG

 

fchopo
Level 10

Re: How to check the result from Get Items

Hello @chenboly 

After retrieving the items from the SharePoint list, you could filter the results using filter array and then check the number of items (if equals to 1, then send the email). I attach an example:

Filter.pngHope it helps!

Ferran

View solution in original post

Super User
Super User

Re: How to check the result from Get Items

@chenboly why have you  got a send email notification in both the green if yes channel AND the red if no channel? That means you will receive the email whatever the outcome of the condition.

Rob
Los Gallardos

chenboly
Level: Powered On

Re: How to check the result from Get Items

@RobElliott because I want to check if the user is not registered in Master List then the email notification back to the user in order for user to request for registration.
chenboly
Level: Powered On

Re: How to check the result from Get Items

@fchopo Thank you very much. It is worked like a charm. 

chenboly
Level: Powered On

Re: How to check the result from Get Items

@fchopo But this method, the condition read only the first row of data. supposed we have more then one row and the employee name placed at the 3th, or 5th row then the condition will go to No.

Do you have any other advise?

chenboly
Level: Powered On

Re: How to check the result from Get Items

sorry, please ignore my previous reply message. in fact, it is working.!!

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons in April

Read the announcement for more information!

firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,079)