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

lookup criteria

Hi all, 

I want to do a lookup in List A where trim(List A. ProjectName) = trim(List B.ProjectCode).

But flow doesn't allow me to use expression trim(List A. ProjectName) . I just only can use List A. ProjectName= trim(List B.ProjectCode).

 

The error msg is: 

The template validation failed: 'The 'inputs' property of template action 'Get_items' at line '1' and column '2275' is not valid. The action cannot reference itself.'.
 
I attached my flow. Could somebody please help with this?
Thank you!lookup error.png
 
4 REPLIES 4
Highlighted
Super User III
Super User III

Re: lookup criteria

@walking 

As you found out, you can only reference a column name as the first part of the OData filter - you can't use an expression.  Have you considered using a Flow to trim the project name column in project A when the item is created or changed? 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Highlighted
Helper I
Helper I

Re: lookup criteria

Hi @ScottShearer 

Thank you for your reply.

 

I think your way would work if I trim project code first when the item is created. and then use the trimed column as the left part of the OData filter.

Actually trim is just the first step, I am going to do where clause with 

tolower(List A. project name) = tolower(List B. project code).

I can't transform all project code to lowercase because it will change the user's input value . The only way I can think is to store tolower(List A. project name) in a new filed.

What do you think? any other option? 

Thank you.

Community Support
Community Support

Re: lookup criteria

Hi @walking ,

 

Could you share more details about the Flow configuration?

The parameters on the left side of the Filter Query cannot be decorated with expression.

You could consider trying to use Filter array to decorate the parameters and filter out the expected 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 I
Helper I

Re: lookup criteria

lookup error1.png

Hi @v-bacao-msft ,

Thank you for your reply.

I uploaded the flow.

 

Could you please provide an example of how to`use Filter array to decorate the parameters and filter out the expected items`?

Thank you.

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (6,748)