cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
fklatecki
Level: Powered On

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
Community Support Team
Community Support Team

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.
fklatecki
Level: Powered On

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?

 

Community Support Team
Community Support Team

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.
fklatecki
Level: Powered On

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"
}
Community Support Team
Community Support Team

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.
fklatecki
Level: Powered On

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

Community Support Team
Community Support Team

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,988)