cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Jazzy_Cavalier
Level: Power Up

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.

 

Flow.png

 

 

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:

 

@AND

(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

1 REPLY 1
Community Support Team
Community Support Team

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

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,467)