cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Microsoft
Microsoft

Query cosmosDB, extract matching items, if items do not match, send email

I am setting up this LogicApp and want to see if my approach is correct:

 

 

I wish to push data from CosmosDB into CRM, and then return these items back to CosmosDB and replace its ID. Not all of the push to CRM is direct due to some of CRMs fields consisting of 'lookup fields'. I have a list of the GUIDs for the lookup fields, but not every record has a match. For the records that do not have a match, I wish to send an email. This is my flow so far:

 

jasmine2020_0-1596678714476.png

jasmine2020_1-1596678770641.png

jasmine2020_3-1596678829257.png

 

jasmine2020_5-1596678888865.png

 

 

I am unsure of my highlighted fields here. Is this the correct approach?

Any suggestion or advice is appreciated

1 REPLY 1
Community Support
Community Support

Hi @jasmine2020,

 

The "Array of ..." seems like an array, the "Document" is an Object, so the comparison not correct.

If you want to compare two fields, you should make sure the two fields are same type. If you want to confirm an array contains a string, use "Contains" condition will be correct choice.

Annotation 2020-08-28 095124.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (6,625)