Invalid Expression - Workflow

Guys, can you help?

image

On a workflow templare (docx) I need to pull the [BranchName] from table Admin" where [Branch] of this row = [Branch] in “Admin”.

The error is below:

Failed: Action not performed because 2 errors are present. Error: Workflow rule ‘Email Customer Quote’ action ‘EmailCustQuote’ Attachment template. Expression ‘FILTER(“Admin”, AND([Branch]=[_THISROW].[Branch]))’ is invalid due to: Condition AND(([Branch] = [ID].[Branch])) has an invalid structure: at least 2 subexpression(s) required. Error: Workflow rule ‘Email Customer Quote’ action ‘EmailCustQuote’ Attachment template. Start expression ‘FILTER(“Admin”, AND([Branch]=[_THISROW].[Branch]))’ should generate a List of Ref values. Please verify that it generates a List and that the contents of the List are Ref values. Ref values should come from the ‘Key’ column of the referenced table…

But I don’t understand why this is.
Can you guys help with this?
Much appreciated.

What don’t you understand?

1 Like

Hi Steve, the expression looks ok to me, all the elements are there, I can’t see teh invalid structure…
[Branch] Is in both the “Admin” table and the “Customers” table.

The workflow works from the customer table, looks at the admin table and if branch and branch are the same pull the branch name.
Admin only has one row for each branch and branchname.

@Dave_Willett
AND() expression requires at least 2 parameters/sub-expressions to evaluate. The AND expression in your FILTER expression has only one, that’s the problem. Remove the AND from the FILTER and try:

<<Start: FILTER(“Admin”, ([Branch]=[_THISROW].[Branch]))>><<[BranchName]>><<End>>
2 Likes

An oversight from my perspective then…
I’m testing from the worksflow, thanks for your support guys.

1 Like

The workflow test says: SUCCESS

Thank you guys.

1 Like

You’re very welcome.

Just a thought guys.
Would the expression work if I wanted to have a logo on the top of the template, meaning change the image relating to the branch?

If you set a proper expression for that, yes of course.

1 Like

Thanks Levent

You’re very welcome