cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BigonJessica
Helper II
Helper II

How to skip Get Items is the ID doesn't exist (ask in powerapps)

Hello,

 

I have a flow that asks in PowerApps the ID that should be related.

But in a step it is possible that there is no ID to bring and in this case my flow is failing.

Is there a way to skip this step if there is no ID match?

 

Thank you,

BigonJessica_0-1659986380833.png

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
ekarim2020
Super User
Super User

Hi @BigonJessica ,

 

Try enclosing your filter query in single quotes:

 

Snag_4ae95b71.png

The expression: length(outputs('Get_items')?['body/value'])

can be used to determine have many items the Get Items action returned. A value of zero means that the ID was not found.
 
Snag_4aeca7ec.png

Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

You should be able to use the ID_Tempo in your query filter:

Snag_d7f799.png

However, to use ID_Tempo in your query filter make sure you use the column's "internal" name in your query or the query wont work. Please see:  How to find the internal name of a SharePoint column – Ellis Karim's Blog

 

Get items will return an array. 

 


Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

5 REPLIES 5
ekarim2020
Super User
Super User

Hi @BigonJessica ,

 

Try enclosing your filter query in single quotes:

 

Snag_4ae95b71.png

The expression: length(outputs('Get_items')?['body/value'])

can be used to determine have many items the Get Items action returned. A value of zero means that the ID was not found.
 
Snag_4aeca7ec.png

Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.

Thank you, Ellis! It worked!

@ekarim2020 Could you help me with one more thing?
The filter I was using is not working very well because of the following:
I created a common code to connect the lists, but the ID is independent. In this column "Parts" and in another one of "Days" I can have several rows referencing the same code, but each one will have a different ID.
When I pull via "ID eq askInPowerApps" I'm bringing only 1 ID, not all that are referenced to that code. Is there a way for me to reference the code?

BigonJessica_0-1660144230488.png

Thank you

You should be able to use the ID_Tempo in your query filter:

Snag_d7f799.png

However, to use ID_Tempo in your query filter make sure you use the column's "internal" name in your query or the query wont work. Please see:  How to find the internal name of a SharePoint column – Ellis Karim's Blog

 

Get items will return an array. 

 


Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.

Grea! I had difficulty at first, but I saw that what was missing was to update this reference in powerapps. Now it's working! Thank you

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (1,753)