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
Solved! Go to Solution.
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 .
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 .
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 @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 @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 .
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 .
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"
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.
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.
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
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
and the field values are same
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.
Thanks for your help,
Best Regards,
Omer Saeed Ali Dayani
User | Count |
---|---|
16 | |
16 | |
14 | |
9 | |
8 |
User | Count |
---|---|
31 | |
28 | |
25 | |
23 | |
13 |