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

Question

Question

Filtering for token content when including token in email

asked on January 19, 2018 Show version history

Use case:  My form captures gauge readings in a table that can have anywhere from 10 to 20 rows.  If any one (or if multiple) gauge readings are >=9.0 I notify a supervisor to address the issue.

Currently the form business process sends the email, but I can't get it to show the specific gauge reading in question.

Meaning, I would like the message to say "A gauge reading of 9.4  for corn hammermill was recorded at . . ." 

Which would require that I isolate the item (corn hammermill) and the gauge reading (9.4) specifically.  When I include the tokens for these specific items I get the full list of values for each of them.

Is there a way to filter the token values to only include the 9.4 gauge reading and it's associated item?

Xiuhong asked that I open this in Answers when we talked at the Information booth last week.

0 0

Replies

replied on January 19, 2018

Someone might come back and say you can script it but I can't script.  So my first thought would be to put a step before the email that starts a workflow and wait until it is done before moving on, pass the values to the workflow to sort and pull out the needed information, then pass it back to the workflow.  

I have a process in forms where I have to verify if the person submitting the form is on a specific list.  At the point the form is submitted, I have it go to a workflow to pull the form information.  I use the information to check the list, then I pass a variable back to the form and the form splits based on the variable.  I also have a separate form (not the one the customer sees) that holds any "background" information I gather on the form or from workflow.

You could "compose" the email as a token in the workflow then pass it back to a multiple line field and when sending the email just the multiple line field as the token.

workflowtoform.jpg
1 0
replied on January 22, 2018

Jennifer, I really like the idea of using Workflow for this.  I will have to give that a try.

0 0
replied on January 19, 2018

Another idea would be to add a hidden column to the table that contains a formula. The formula might include an if statement IF(condition,valueIfTrue,valueifFalse), and the valueIfTrue should be a CONCATENATE("A gauge reading of ", INDEX(gaugeColumn,ROW())," for ", gaugeLocation, "...").

Basically, if the value of the gauge at a specific row in the is greater than 9, that hidden column will pull the value from that specific row and put it in the string. It sounds like your string is built outside of the table using ALL of the table rows instead of inside the row itself. 

At the end of the table, you could use those strings to put in your email so it's just the high values. 

0 0
replied on January 22, 2018

Jared, can I hide an individual column in a forms table?  When you reference the string being built outside of the table vs. inside, I'm not quite sure what you mean.  I like the idea of being able to keep the content w/in the form, so if you wouldn't mind providing some more detail, that would be great!

0 0
replied on January 22, 2018

Here's an example that may help. I may not have fully understood your gauge/item use case, but hopefully you can use the concepts to build it out how you'd like. 

I have a table with columns for Gauge, Item, and String, and then another field outside of the table for Final string. 

Opening up the table field options, then going into the String field options, I used the formula:

=IF(
INDEX(Table.Gauge,ROW()) >= 9,
CONCATENATE("A gauge reading of ", INDEX(Table.Gauge,ROW()), "  for ", INDEX(Table.Item,ROW()) ," was recorded at . . ." ),
"")

Saying IF the value of gauge for each row is greater than 9, create a string reading "A gauge reading of GAUGEVALUE for ITEMNAME was recorded at..."

Otherwise, if the value is less than 9, leave the string value blank. 

 

Then in the Final String field, I used the formula

=CONCATENATE(Table.String)

to put all the strings for the high gauge values together. 

You can use field rules to always hide the string column in the table. 

You can see for the two gauge values higher than 9, the strings we added to the final string at the end. 

1 0
replied on January 22, 2018

Jared, thanks for the visual with this, it helped!  I will have to see how this will work with my use case, but I believe this could be what I need.  Thank you.

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

Sign in to reply to this post.