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

SQL GetRows Filter GetSubStringof

The objective of my flow is as follows:

  • Get user input through an MS form.
  • Query on a text value entered in the form, which will be a substring of the value in the database table field. (eg: user enters: "192876", field contains "019287632584  ")

Tried using "substringof" in the "filter Query option", but the Flow throws an error stating:

"message": "An unknown function with name 'substringof' was found

substringof.GIF

What am I doing wrong?
 
1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: SQL GetRows Filter GetSubStringof

Hi @NazIM ,

 

I have made a test on my side, when use the substringof function in the Get row action of SQL Server connector, the flow would run failed with thw same error message as yours.

The substringof function is not supported in the Filter Query in SQL Server currently, as is discussed in the link below:

https://powerusers.microsoft.com/t5/General-Flow-Discussion/ODATA-substringof-not-valid-in-GET-ROWS/...

 

So please take a try with my solution in my first reply to use the "Filter Array" action to achieve your requirement, please let me know if your problem could be solved.

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
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

3 REPLIES 3
Community Support Team
Community Support Team

Re: SQL GetRows Filter GetSubStringof

Hi @NazIM ,

 

The 'substringof' isn't an exist function in microsoft flow, do you want to use the substring function as link below?

https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#s...

 

Also if you want to filter items from the sql table, you need to enter the expression in the Filter array field with type as below:

Title eq 'Dynamic content from the form'

 

I suggest that you could take a try with the "Filter array" action since it is easier, please refer to screenshot below:

1.png

 

Best regards,

Alice       

 

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

 

NazIM
Level: Powered On

Re: SQL GetRows Filter GetSubStringof

I don't think that is necessary. The filter does work (I have tried the part just before the AND and it works). This (https://veenstra.me.uk/2018/11/12/microsoft-flow-filter-queries-in-sharepoint-get-items/) blog states that substringof is a valid function for the filter query.

 

Dont know what Im missing here.

Community Support Team
Community Support Team

Re: SQL GetRows Filter GetSubStringof

Hi @NazIM ,

 

I have made a test on my side, when use the substringof function in the Get row action of SQL Server connector, the flow would run failed with thw same error message as yours.

The substringof function is not supported in the Filter Query in SQL Server currently, as is discussed in the link below:

https://powerusers.microsoft.com/t5/General-Flow-Discussion/ODATA-substringof-not-valid-in-GET-ROWS/...

 

So please take a try with my solution in my first reply to use the "Filter Array" action to achieve your requirement, please let me know if your problem could be solved.

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
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

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons in April

Read the announcement for more information!

firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (10,009)