cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
martinav
Resident Rockstar
Resident Rockstar

I need help writing a filter in the expression builder

I am working on a crazy complex flow simply to be able to search for a filename in a directory that has mixed case.  I have a filename to look for, but the case can be anything.  I have it all completed, except for the case where I can get a partial return on my search.  The only think I need to do now is to filter for the situation that the length of my search result must be the same number of characters as my search for text.  That way, I dont get a 999996.pdf returned for a 96.pdf search.  Make sense?

 

Here is my block.  I want this table to contain "Name" only when "Name" is the same number of characters as my variable "NameLength".  The basic logic is:

 

if(length(Name)=NameLength,Name,null)

 

2018-12-07 14_06_47-Edit your flow _ Microsoft Flow.png 

 

I have no clue how this can be written in the MS Flow Expression builder.  I have done some basic string and math, but not an if statement.  Help online is so sketchy.

1 ACCEPTED SOLUTION

Accepted Solutions
martinav
Resident Rockstar
Resident Rockstar

I worked on it a litte, and came up with this.  I think i'm back in the game now. 

 

if(equals(length(item()?['Name']),variables('NameLength')),item()?['Name'],null)

 

 

2018-12-07 14_23_47-Edit your flow _ Microsoft Flow.png

View solution in original post

1 REPLY 1
martinav
Resident Rockstar
Resident Rockstar

I worked on it a litte, and came up with this.  I think i'm back in the game now. 

 

if(equals(length(item()?['Name']),variables('NameLength')),item()?['Name'],null)

 

 

2018-12-07 14_23_47-Edit your flow _ Microsoft Flow.png

View solution in original post

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (50,716)