cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Riffy
Frequent Visitor

Dynamic Filter Array Action via multiple expressions in advance mode

I am looking to pass multiple expressions through a power app function parameter to the filter array advance mode. 

 

3.png

 

For example: 
 
1. On my PowerApp, I am passing this expression to flow and saving it as a variable. 
2. Expression:

 

 

 

 

 

@or
contains(item()?['body'],variables('RawSearch')),
contains(item()?['Subject'], variables('RawSearch')),
contains(item()?['ccRecipients'], 'planet')
)
​

 

 

 

 

3. I then would like to use that variable as the "advance expression" block. 


1.png2.png
 
 

Things that I have tried:
1. Using the manual trigger flow and capture the expression passed as the triggerbody()['text_2'], which does get the expression as a string, but it doesn't recognize it once it goes through the filter action. 
2. leaving the "@" then adding the variable without "@" and vise versa. 

3. Passing everything together in one variable, triggerbody(). 

4. assigning it to a compose and passing that instead. 

The goal is to build the expression I need from the frontend/Powerapp and just passing that to the filter array dynamically. 

1 ACCEPTED SOLUTION

Accepted Solutions
robdev
Advocate I
Advocate I

You can always try the following technique that requires you to build/deploy a very simple Azure function.  The gist of this approach is that you will write inline JavaScript in the HTTP action's body and have the Azure function evaluate this JavaScript code and return the results as a JSON object.  Have a look at the video at https://www.youtube.com/watch?v=L9UqHKF9H60&t=178s

 

The following is an example of the technique in action:

inline-js-in-powerautomate.png

View solution in original post

1 REPLY 1
robdev
Advocate I
Advocate I

You can always try the following technique that requires you to build/deploy a very simple Azure function.  The gist of this approach is that you will write inline JavaScript in the HTTP action's body and have the Azure function evaluate this JavaScript code and return the results as a JSON object.  Have a look at the video at https://www.youtube.com/watch?v=L9UqHKF9H60&t=178s

 

The following is an example of the technique in action:

inline-js-in-powerautomate.png

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.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (2,479)