cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Alkindi1222
Helper II
Helper II

SharePoint Online-Check if the field value is same in the existing data

Hello,

 

I need help to create the flow for SharePoint online list, when created check if the field "Invoice Number" value is same in the existing data. If found same trigger email to ex person.

 

Thanks for you support,

 

Omer Dayani

2 ACCEPTED SOLUTIONS

Accepted Solutions
Diksha
Resolver IV
Resolver IV

Hello @Alkindi1222 ,

 

Implement below steps to achieve this -

 

Step 1 : Use Trigger "When an item is created" .

Step 2 : Use action "Get items" and apply Filter Query as below - 

InvoiceNumber eq '@{triggerOutputs()?['body/InvoiceNumber']}' and ID ne '@{triggerOutputs()?['body/ID']}'

 The above query will get all the items in list where InvoiceNumber is equal to the InvoiceNumber which is recently added

 and where ID is not equal to the Current Item ID .

Capture.PNG

Step 3 : Apply Condition to check if the above Get Items output returns any result ( i.e if output is greater than 0 , this means
             lnvoiceNumber added is same in existing data . 

length(outputs('Get_items')?['body']?['value'])


Step 4 : If Condition  is true , then Send an email .

Capture1.PNG

  

If this answered your question, please mark this question as answered and if you liked my response, please consider giving it a thumbs up .

Thank You !!!

View solution in original post

Hello @Alkindi1222 ,

 

This indirectly means that you want to check if the pair of Vendor Name and Invoice Number is repeated.

You can apply the following Filter Query and check - 

VendorName eq '@{triggerOutputs()?['body/VendorName']}' and InvoiceNumber eq '@{triggerOutputs()?['body/InvoiceNumber']}' and ID ne '@{triggerOutputs()?['body/ID']}'

 

If this answered your question, please mark this question as answered and if you liked my response, please consider giving it a thumbs up .

Thank You !!!

View solution in original post

11 REPLIES 11
Diksha
Resolver IV
Resolver IV

Hello @Alkindi1222 ,

 

Implement below steps to achieve this -

 

Step 1 : Use Trigger "When an item is created" .

Step 2 : Use action "Get items" and apply Filter Query as below - 

InvoiceNumber eq '@{triggerOutputs()?['body/InvoiceNumber']}' and ID ne '@{triggerOutputs()?['body/ID']}'

 The above query will get all the items in list where InvoiceNumber is equal to the InvoiceNumber which is recently added

 and where ID is not equal to the Current Item ID .

Capture.PNG

Step 3 : Apply Condition to check if the above Get Items output returns any result ( i.e if output is greater than 0 , this means
             lnvoiceNumber added is same in existing data . 

length(outputs('Get_items')?['body']?['value'])


Step 4 : If Condition  is true , then Send an email .

Capture1.PNG

  

If this answered your question, please mark this question as answered and if you liked my response, please consider giving it a thumbs up .

Thank You !!!

I am very thankful to you @Diksha 

 

Following your steps, I was able to archive my flow expectation. 

 

I got one issue with the send email, receiving lot of emails. I believe the issue with "apply to each"

Alkindi1222_0-1602944924300.png

 

 Once again Many Thanks and god bless you,

Best Regards,

Omer Bin Saeed Ali Dayani

 

Hello @Alkindi1222 ,

 

Glad to hear that the solution worked for you..🙂🙂

 

For the issue you have mentioned - 

Yes you are right, you are receiving a lot of emails because of Apply to each you have used. 

The Apply to each action will run for each item which results in sending an email multiple times.

 

If this is not required, remove an apply to each action and check . 

 

Thanks, 

Diksha Poddar

Dear @Diksha 

 

Could you please help me out to have condition for the field "Vendor Name" and "Invoice number.

 

We require check on Vendor Name with Invoice number, let me try to explain :

 

When Vendor Name "Ex" is selected the invoice number needs to be verify under the vendor name, need to check if the invoice number "101" was used earlier. If yes send email.

 

Alkindi1222_0-1603003939634.png

 

Thanks,

 

Omer Bin Saeed Ali Dayani

Hello @Alkindi1222 ,

 

This indirectly means that you want to check if the pair of Vendor Name and Invoice Number is repeated.

You can apply the following Filter Query and check - 

VendorName eq '@{triggerOutputs()?['body/VendorName']}' and InvoiceNumber eq '@{triggerOutputs()?['body/InvoiceNumber']}' and ID ne '@{triggerOutputs()?['body/ID']}'

 

If this answered your question, please mark this question as answered and if you liked my response, please consider giving it a thumbs up .

Thank You !!!

Hello @Diksha 

 

Yes, you are correct. But unfortunately the filter you provided me did not work for me.

 

Alkindi1222_0-1603089422777.png

 

Any modification required in condition?

 

Thanks,

Hello @Alkindi1222 ,

 

Can you please check if you are using the correct internal names in Filter query ?

 

Also, what is the error message you are getting. Can you please share the screenshot of it ?

 

Thanks,

Diksha 

Hello @Diksha 

 

Thanks for your reply,

 

The column name are having space due to which the internal names appear different

Alkindi1222_0-1603091246173.png

Alkindi1222_1-1603091411937.png

 

No error message, the condition is not working only. If yes i need to get email right, that i am not able to get .

Hi @Diksha 

 

i am getting expression result as False

 

Alkindi1222_0-1603264758977.png

and the field values are same

PA.JPG

 

Do you think it is related to expression?

 

Thanks,

Omer Saeed Ali Dayani

Hello @Diksha 

 

It worked for me, the only issue was with the column name value, if the column type is dropdown then i need to select the column name with value, screenshot below. If the column type is text then without value. 

Alkindi1222_0-1603270311522.png

 

Thanks for your help,

 

Best Regards,

Omer Saeed Ali Dayani

 

Hello @Alkindi1222 ,

 

Awesome 👍😊

 

If you need any other help, do let us know .

 

Thanks,

Diksha

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

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

Community Calls Conversations

Community Calls Conversations

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

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (4,152)