You are viewing limited content. For full access, please sign in.

Question

Question

Forms: Using IF and JOIN to make a list of items in a table that meet a condition

asked on November 7, 2022 Show version history

I have a table with items, descriptions, and reason codes.  I'd like to make a list of the items that meet certain conditions in a separate multi-line box so I can include that list in an email task.

I tried using IF and JOIN in the multi-line box's formula but I'm not getting any results. The formula is:

=IF(INDEX(Table.ReasonCode,ROW()) = "RJQ",
JOIN("- ",INDEX(Table.Item_Description,ROW())),"")

If I just use the variable selector in the email task I get a list of all item descriptions in the table, separated by semi-colons. 

Here's an example of the records in the table:

My end goal is to send an email with a list of Item Descriptions for the items with an RJQ or PRQ reason code. Ultimately I'd like a list with line breaks so it looks something like this:

Celery Naked 30 - RJQ
ORG Broccoli 14 - PRQ
Cauliflower Wrp - RJQ

etc.

Another option would be to have a hidden table that shows only the records with RJQ and PRQ; I know I can do that with formulas in the hidden table but the output to an email would still look like a list of Item Descriptions separated by semi-colons and then a list of Reason Codes separated by semi-colons. 

Is there a way to just embed a table in an email, perhaps using HTML instead of the visual editor for the email?

 

 

 

 

0 0

Replies

replied on November 8, 2022

One option would be to add another column to the table that uses CONCATENATE to create your desired row output, then insert only that column into the email.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.