Expand my Community achievements bar.

SOLVED

Sending Dropdown Displayname in Email Template

Avatar

Level 3

I am sure I am missing something. I cannot find the syntax to refer to the displayname in a dropdown list. ${mydropdown} gives me the value but I need both the value and the displayname. I've verified that they are both set correctly by using a rule to populate two text fields with them.

Any assistance is appreciated.

@workflowuser 

1 Accepted Solution

Avatar

Correct answer by
Level 3

The answer to the issue is that the displayname cannot be used in the email template without first creating a rule to update a text field with it. The text field can then be used in the email template.

View solution in original post

11 Replies

Avatar

Employee Advisor

looks like you want to include the displayname in the email template? can you please tell us your use case?

Avatar

Level 3

Yes, we have a list of contacts who are responsible for specific items. Our citizens need to be able to choose a topic and the email with their question will go to the appropriate person.

Dropdown configuration:

Value = contact email

Displayvalue = topic

 

I can send the email using the value but would like to include the topic chosen in the email subject for the person receiving it.

Avatar

Employee Advisor

maybe try something like this for your drop down

John@abc.com,Finance=Finance

Cathy@123.com,Internal Audit=Internal Audit

Then using javascript string manipulations you can extract the email and Department from the value

Avatar

Level 3

After manipulating the values, how do I refer to them in the email?

Avatar

Level 3

I think it's either not possible or I don't know the syntax.

Avatar

Employee Advisor

https://acrobat.adobe.com/link/track?uri=urn:aaid:scds:US:17acc957-0079-424e-9fad-258539acd5b3

This form has a drop-down. I have split the display value and the email into two strings and output them in two text boxes. in your form, you can hide the two text boxes

Avatar

Level 3

Yes, I've done that.

But here is the whole story. I've developed a component that reads a JSON file from the DAM and populates the options property of the dropdown. This will most likely be used multiple times in different forms so I would like it to simply pickup the value and the displayvalue for use in the email or whatever submission action I choose.

I've tried JavaScript, text boxes, XML instead of JSON, etc. 

I've even tried including the textbox control directly in the component so I could assign the value in the component and hide it but that doesn't work either.

I was really hoping for a ${mydropdown.displayvalue} or such.

Avatar

Employee Advisor

ok, found an easier way

if (( this.value !== null && this.value !== "" )) {

console.log(this.displayValue);
console.log(this.value);


}

Avatar

Correct answer by
Level 3

The answer to the issue is that the displayname cannot be used in the email template without first creating a rule to update a text field with it. The text field can then be used in the email template.