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

filtering with a parameter from a button

Greetings,

 

I am bring a Parameter 'string' from a button select through from compose to initialize no problems. I have trying to filter the list items, and I can see the list item. I am trying to filter by comparing a field <new_name> against a the string, using the function "contains". For example the new_name = 'Test Company - date", and the parameter string would be "test". Looking for the result of 'Test Company - date'. I am using the Filter array, because as I understand the Filter Query (odata) does not support a "contains" function.

 

Unfortunately, the results are not filtered at all by the Filter Query. Thoughts???1.png2.png3.png

 

 

7 REPLIES 7
Highlighted
Community Support
Community Support

Re: filtering with a parameter from a button

 

Hi @fklatecki ,

 

What is the problem you are currently experiencing?

 

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.
Highlighted
Helper II
Helper II

Re: filtering with a parameter from a button

Greetings, 

 

It appears that the filtering is not working as designed, the input data is appears to unaffected by the filters I believe I have used.

 

When hard coding Filter Query, rather than a variable, the process works as designed.


new_name eq 'xxxxYYYY Interiors - 10/22/2019 2:48 PM ' ("new_name" is the field from the source data, the xxxxYYYY is valid field value in "new_name".

 

Thoughts?

 

Highlighted
Community Support
Community Support

Re: filtering with a parameter from a button

 

Hi @fklatecki ,

 

It is workable to use variables as a filter in Filter Query. However, you need to note the type of field. If the type is string, you need to add single quotes outside the variable.

Please refer to this blog and get more details about Filter Query:

https://veenstra.me.uk/2018/11/12/microsoft-flow-filter-queries-in-sharepoint-get-items/

 

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.
Highlighted
Helper II
Helper II

Re: filtering with a parameter from a button

Thank you for your suggestion, however when I created a filter query for a substringof as shown in the link you provided. This is the failure message generated by the flow , substringof('@{variables('Dealer_name')}',new_name), where variable 'Dealer_name' is part to the field, 'new_name'.

 

{
"status": 400,
"message": "An unknown function with name 'substringof' was found. This may also be a function import or a key lookup on a navigation property, which is not allowed.",
"source": "ixxxxxx.dynamics.com",
"errors": [],
"debugInfo": "clientRequestId: 53977d26-0eb6-4a01-b035-69509f7e9068"
}
Highlighted
Community Support
Community Support

Re: filtering with a parameter from a button

 

Hi @fklatecki ,

 

I think Substringof() is not supported. In my previous tests, I also reproduced the same error.

 

So, directly using Filter Query to determine whether the specified field contains the specified string is not possible.

 

The current method we can consider is to use Condition or Filter array directly.

 

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.
Highlighted
Helper II
Helper II

Re: filtering with a parameter from a button continuting with no solution

 

Greeting, 

 

This issue continues with resolution. Is this bug in Power Automate. The formula is accepted by the filter array process has no affect on the output, as though the Filter Array did not exist. Is there a work around? Is there new develop planned?

 

Regards,

 

 

Capture.PNG

Highlighted
Community Support
Community Support

Re: filtering with a parameter from a button continuting with no solution

 

Hi @fklatecki ,

 

Have you checked whether there are eligible records in the entity?

Are the formulas shown in the screenshot generated after you click advance mode or are you manually configured?

If not, you can try to use Dynamic content to configure the Filter array, provided that there are eligible records in the entity.

 

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.

Helpful resources

Announcements
FirstImage

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (3,248)