Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

Getting a record which matches a criteria

Hi all, I'm relatively new to Microsoft Flow so I apologize if this query is simple or cannot be carried on Flow.





I'm looking to set up a Flow that will automatically populate a "Berth" lookup in the "Job" entity upon the creation of a job record.


Previous versions of the flow that ran successfully would countinuosly try and populate the lookup with every Berth that fit the criteria, and the Berth would constantly be switching.


I asked a colleague for help and they ended up with the above Flow.


The criteria that the berth must must fulfil is as follows:

new_lengthm < new_maximumlengthm2                            (both integers)

new_draft < new_maximumdraft                                          (both integers)

new_Occupant = null                                                            (new_occupant is a lookup field)


The 'condition 5' that my colleague ended up with was:



(greater(items('Apply_to_each_6')?['new_maximumdraft'], body('Get_record')?['new_draft']), equals(items('Apply_to_each_6')?['new_occupant'], ''))


and he told me he couldn't work out his syntax mistake(s).


If anybody would be able to help with the situation in any way at all I'd appreciate it a lot, and also if it's any help; the current flow runs successfully, it just doesn't assign a berth at all.


Thank you

Community Support
Community Support

Re: Getting a record which matches a criteria

Hi @Jazzy_Cavalier


It seems that you are using custom entities. Do you want to look up from the entity Berth when a new job record created?

What’s the error message when the flow runs with the condition?

Do you want the condition match all of the three items that you mentioned?


Best regards,

Mabel Mao

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

Helpful resources


Super User Program Update

Three Super User rank tiers have been launched!


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021


New & Improved Power Automate Community Cookbook

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


Power Automate Community User Group Member Badge

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

Top Solution Authors
Top Kudoed Authors
Users online (8,952)