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

Question

Question

How to include one or multiple selected checkbox values in email body in Laserfiche Forms?

asked on April 10 Show version history

I'm working on a form review process where the client wants to minimize errors. They've requested a checkbox with multiple predefined options they can select from. Depending on their selection, certain predefined content should be included in the body of an email sent to the client.

It's important to note that the client might select one or multiple options, so the logic needs to account for combining those selected values into the email message dynamically.

So far, I’ve created the checkbox and some text fields with the default content, but I'm struggling to figure out how to dynamically include the selected values in the message.

Has anyone done something similar or could suggest a way to approach this?

Thank you. 

url-link.png
url-link.png (39.9 KB)
0 0

Answer

SELECTED ANSWER
replied on April 21 Show version history

Angela, following the article you reminded me of above and playing a bit with the AI  integrated into doc.laserfiche.com, I have found a solution to this dilemma using formulas, which I share here as I did. Perhaps someone can find a more refined solution by applying best practices, but for now, this one is working according to what I need. If someone improves it, it will be perfect.

I create a new Field (Multi Field) and put the formula inside, and it works perfectly, and went I put the Multi Field Variable into an Email task and send it automatically, Outlook puts the Ahrefs tags to the URLs and makes it clickable without problems. 

I used the variables field where I put the URL links, because it is easier to update the field value instead of the URL inside the formula. And hide those fields. 

I hope this can help any other members in case they need something like this. 

=CONCATENATE(
  IF(First_Planning_Review_Optional_Link.OP1, "Inspection Fee Payment URL: ",""), //Add the URL header title
  IF(First_Planning_Review_Optional_Link.OP1, Inspection_Fee_Payment_URL_Link, ""), // Add the field variable where I have the URLs
  IF(First_Planning_Review_Optional_Link.OP1, CHAR(13) & CHAR(10), ""), // Add line break between URLs
  IF(First_Planning_Review_Optional_Link.OP2, "Subsequent Inspection Fee Payment URL: ",""), //Add the URL header title
  IF(First_Planning_Review_Optional_Link.OP2, Subsequent_Inspection_Fee_Payment_URL_Link, ""), // Add the field variable where I have the URLs
  IF(First_Planning_Review_Optional_Link.OP2, CHAR(13) & CHAR(10), ""), // Add line break between URLs
  IF(First_Planning_Review_Optional_Link.OP3, "Application Fee Payment URL: ",""), //Add the URL header title
  IF(First_Planning_Review_Optional_Link.OP3, Application_Fee_Payment_URL_Link, ""), // Add the field variable where I have the URLs
  IF(First_Planning_Review_Optional_Link.OP3, CHAR(13) & CHAR(10), ""), // Add line break between URLs
  IF(First_Planning_Review_Optional_Link.OP4, "Operation Renewal License Application URL: ",""), //Add the URL header title
  IF(First_Planning_Review_Optional_Link.OP4, Operation_Renewal_License_Application_URL_Link, ""), // Add the field variable where I have the URLs
  IF(First_Planning_Review_Optional_Link.OP4, CHAR(13) & CHAR(10), ""), // Add line break between URLs
  IF(First_Planning_Review_Optional_Link.OP5, "Operation New License Application URL: ",""), //Add the URL header title
  IF(First_Planning_Review_Optional_Link.OP5, Operation_New_License_Application_URL_Link, ""), // Add the field variable where I have the URLs
)

 

1 0

Replies

replied on April 10

It's difficult to envision the expected output, but I would just use a workflow with a token to contain the HTML and a series of conditional activities for each checkbox that will append to the HTML token if the checkbox was checked. Then when you add the HTML token to the body of the email you just have to format the token as HTML using the token dialog, "Apply Formatting" with value "HTML". I assume you are adding links from the screenshot above, so the value for an example modify token activity for a token called "FormattedBody" would be:

%(FormattedBody)<a href="%(InspectionFeePaymentLink)">Inspection Fee Payment Link</a>

And when you insert the token into your email, it would look like:

%(FormattedBody#"HTML"#)
1 0
replied on April 10

Thanks for your reply. I'll see if I can implement what you recommend to see if I can achieve this. I'll let you know.


Yes, indeed, what they want is to include certain links in the body of the message that clients should follow based on what they should do next, according to the decision of the person reviewing the form.

0 0
replied on April 18

This option might work for you: Forms: How can we remove underscores from checkbox values? The definitive solution please. - Laserfiche Answers

It looks like the example you added in that post previously didn't work because you were missing some ) at the end.

1 0
replied on April 21

Hi Angela, I will check it now. You know, we have a lot on our minds, and sometimes we forget we've already done something like that before. 

Thank you! 

0 0
replied on April 21

I have absolutely asked the same question on here before :)

1 0
SELECTED ANSWER
replied on April 21 Show version history

Angela, following the article you reminded me of above and playing a bit with the AI  integrated into doc.laserfiche.com, I have found a solution to this dilemma using formulas, which I share here as I did. Perhaps someone can find a more refined solution by applying best practices, but for now, this one is working according to what I need. If someone improves it, it will be perfect.

I create a new Field (Multi Field) and put the formula inside, and it works perfectly, and went I put the Multi Field Variable into an Email task and send it automatically, Outlook puts the Ahrefs tags to the URLs and makes it clickable without problems. 

I used the variables field where I put the URL links, because it is easier to update the field value instead of the URL inside the formula. And hide those fields. 

I hope this can help any other members in case they need something like this. 

=CONCATENATE(
  IF(First_Planning_Review_Optional_Link.OP1, "Inspection Fee Payment URL: ",""), //Add the URL header title
  IF(First_Planning_Review_Optional_Link.OP1, Inspection_Fee_Payment_URL_Link, ""), // Add the field variable where I have the URLs
  IF(First_Planning_Review_Optional_Link.OP1, CHAR(13) & CHAR(10), ""), // Add line break between URLs
  IF(First_Planning_Review_Optional_Link.OP2, "Subsequent Inspection Fee Payment URL: ",""), //Add the URL header title
  IF(First_Planning_Review_Optional_Link.OP2, Subsequent_Inspection_Fee_Payment_URL_Link, ""), // Add the field variable where I have the URLs
  IF(First_Planning_Review_Optional_Link.OP2, CHAR(13) & CHAR(10), ""), // Add line break between URLs
  IF(First_Planning_Review_Optional_Link.OP3, "Application Fee Payment URL: ",""), //Add the URL header title
  IF(First_Planning_Review_Optional_Link.OP3, Application_Fee_Payment_URL_Link, ""), // Add the field variable where I have the URLs
  IF(First_Planning_Review_Optional_Link.OP3, CHAR(13) & CHAR(10), ""), // Add line break between URLs
  IF(First_Planning_Review_Optional_Link.OP4, "Operation Renewal License Application URL: ",""), //Add the URL header title
  IF(First_Planning_Review_Optional_Link.OP4, Operation_Renewal_License_Application_URL_Link, ""), // Add the field variable where I have the URLs
  IF(First_Planning_Review_Optional_Link.OP4, CHAR(13) & CHAR(10), ""), // Add line break between URLs
  IF(First_Planning_Review_Optional_Link.OP5, "Operation New License Application URL: ",""), //Add the URL header title
  IF(First_Planning_Review_Optional_Link.OP5, Operation_New_License_Application_URL_Link, ""), // Add the field variable where I have the URLs
)

 

1 0
replied on April 10

You can insert variables into the body of your email in a business process in order to dynamically fill information, and there is the option to select "List of all checked" when selecting a checkbox variable.

The issue I ran into is that LF doesn't allow you to enter a URL in a checkbox value field (it converts any symbols to underscores), but I'm curious if you might be able to work around this by using a data table and a lookup rule?

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

Sign in to reply to this post.