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

Question

Question

use dataset variable in subject line of the email

asked on March 3, 2021 Show version history

Hello, 

I know that I can use a variable in subject line in the process diagram (email service task) to show the value when someone receives an email . My problem is that I want to have a department name (generated from drop down list in the form) to be in the subject line, but it generates the value assigned to that choice instead of the choice. Is there a way to fix it? I need the values to be assigned to choices because I use the values to assigned to user task in the process diagram. 

 

Thank you!

 

it request.PNG
it r.png
it re.png
it request.PNG (5.54 KB)
it r.png (16.17 KB)
it re.png (4.92 KB)
0 0

Answer

SELECTED ANSWER
replied on March 4, 2021

This is not supported as the variable value of dropdown is the value not the choice when the choice has assigned value.  You can add another hidden single line field(use field rule to hide it always and save the data) and set its value as the dropdown's selected choice using JavaScript and use the variable of the single line field in the email instead. 

$(document).ready(function () { 
$('.dropdowncss select').change(function(){
  var selectedChoice=$('.dropdowncss select option:selected').text();
  $('.singlelinecss input').prop("value",selectedChoice);
});
});

0 0
replied on March 4, 2021

This has been a mild annoyance since the early days of Forms. Any chance we can get tokens for both display and value for cases like this, including checkboxes and radio buttons?

0 0
replied on March 4, 2021

I would say the chance to change it is very small as it will affect the ways Forms save the submission data, display the instance variables data in monitor and reports which will required big effort for refactoring and also need to consider it will not affect customers' existing processes which use the dropdown/radio button/checkbox variables in steps.

0 0
replied on March 5, 2021

I don't mean to change the behavior; keep it as-is with values, but include an additional set of tokens for the display.

0 0

Replies

replied on March 3, 2021

Hi Tetiana,

You may use JavaScript to get the selected choice and use a hidden field to hold it, then use the hidden field in user task name. An example to get drop-down choice is https://answers.laserfiche.com/questions/122119/Accessing-values-field-from-dropdown-list#122139

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

Sign in to reply to this post.