Copy link to clipboard
Copied
Folks,
I have a selection box with the following items to select: Low, Medium and High. I also have a text box where I want the following to appear.
When selecting the item "Low" in the check box, the text box should read "Level 1: Contract manager performs Local Investigation"
When selecting the "Medium" item in the check box, the text box should read "Level 2: Operational manager conducts research in the contract"
When selecting the item "High" in the check box, the text box should read "Level 3: Contract Director / Independent Investigation"
Is there a possibility?
Copy link to clipboard
Copied
Sure, it's possible, but do you want the field to only have one of these values, or should it be possible to edit it freely (for example, if no check-box is ticked)?
Copy link to clipboard
Copied
I want you to have one of the values when selecting the item and that someone can not edit. It should be fixed.
Copy link to clipboard
Copied
OK. Let's say the drop-down field is called "Dropdown1". Use this code as the custom calculation script of the text field:
var v1 = this.getField("Dropdown1").valueAsString;
if (v1=="Low") event.value = "Level 1: Contract manager performs Local Investigation";
else if (v1=="Medium") event.value = "Level 2: Operational manager conducts research in the contract";
else if (v1=="High") event.value = "Level 3: Contract Director / Independent Investigation";
else event.value = "";
Set the text field as read-only, so its value can't be changed by the user.