Copy link to clipboard
Copied
I have read through the various postings on this community page but still a bit confused.
I have a drop down list with the following
Bond
Equity
Mutual Fund
For each the export value is:
I recommended this Bond based on...
I recommended this Equity based on...
I recommende this Mutual Fund base on
using the following script from the forum
var f = this.getField("Type of Security");
if (f.valueAsString=="Bond") event.value = "Text 1";
else if (f.valueAsString=="Equity") event.value = "Text 2";
else if (f.valueAsString=="Mutual Fund") event.value = "Text 3";
else event.value = "Default text";
Is this a validation custom script, does it go under format, or as a custom calculcation?
I have tried all three and my text box does not show the export value. Is there something wrong with my approach?
Copy link to clipboard
Copied
Forgot to include that once the field is populate I would like to allow the user to enter additional text into the field at the end of the export value
Copy link to clipboard
Copied
Get rid of that code, and the export values, and use this code as the custom Validation script of the drop-down field (and make sure to tick the option to commit the selected value immediately):
this.getField("2.Details of recommendations").value = "I recommended this "+event.value+" based on the clients investment objective and risk tolerance. The discussion was based on the following:";