cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ElMeSaFeR
Helper IV
Helper IV

filter outputs expression

Hi, 

 

I have two SP lists ( A, B) 

list B contain a column name (Doc_ID) , It should be a reference for A list ID column 

 

A >>> ID, Title, Name, ... 

B >>> ID, Title, Doc_ID, Name, ... 

 

I have a flow with multiple steps, one them with name (Get Items for list B)

the next step is Compose with

 

outputs('Get_Items_For_list_B')

 

to give me all details, But I need to filter the outputs by a specific ID

 

I need help about the code please!

1 ACCEPTED SOLUTION

Accepted Solutions

 

Hi @ElMeSaFeR ,

 

If you want to filter items with equal values of ID and DocID, I am afraid the best option is to use Filter array. At present, we cannot directly use expression in Compose to filter an array. There is no function can achieve this.

 

I noticed that the value of DocID is a string, then you also need to use int() function to convert this value.

Image reference:

25.PNG

Hope this helps.

 

Best Regards,

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

View solution in original post

6 REPLIES 6
abm
Super User
Super User

Hi @ElMeSaFeR 

 

If you looking to filter the List B by specific ID then use the filter query to extract the values.

 

image.png

 

If your ID is numeric column then you don't need to use the single quotes around it.

 

ID eq 10

 

Thanks

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

@abm 

Thanks a lost for your reply, but I need it in code because I'm using a "Compose" outputs already

so I need to filter this outputs 

Hi @ElMeSaFeR 

 

 Could you please explain what you meant by code and you using compose? Could you post a screenshot of your flow?

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

Hello @abm 

 

this this the steps 

 

11.png

 

then this is the outputs 

 

22.png

 

I need expression like 

Outputs('GetItems') where ID = DocID 

 

to replace it in the (Compose 2) step

 

Hi @ElMeSaFeR ,

 

If you want to filter items with equal values of ID and DocID, I am afraid the best option is to use Filter array. At present, we cannot directly use expression in Compose to filter an array. There is no function can achieve this.

 

I noticed that the value of DocID is a string, then you also need to use int() function to convert this value.

Image reference:

25.PNG

Hope this helps.

 

Best Regards,

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

@v-bacao-msft 

Thanks a lot

it's working with me 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (4,132)