cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lee-martin
New Member

Getting a count from List Records

Hi

 

I'm using fetchxml in flow in order to calculate how many records exist when I list. - The idea being if something matches the criteria and the count is above 0, then no new record is added.

 

However I'm getting all sorts of errors when I do this, and even if I get something working, I can't run a condition on the value of the count - as I can't identify the count field.

 

Can anybody give me any ideas how to achieve this?

 

Thanks
Lee

 

1 ACCEPTED SOLUTION

Accepted Solutions
edgonzales
Super User II
Super User II

@lee-martin 

Hey there.  So, the "List Records" action should be giving an array, ya?  If so, then you should be able to use Length() to give you a count of how many 'elements' are in that array.

 

Check it out and keep us posted.

 

-Ed

 

If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

View solution in original post

1 REPLY 1
edgonzales
Super User II
Super User II

@lee-martin 

Hey there.  So, the "List Records" action should be giving an array, ya?  If so, then you should be able to use Length() to give you a count of how many 'elements' are in that array.

 

Check it out and keep us posted.

 

-Ed

 

If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

View solution in original post

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Users online (25,675)