Skip to main content
Participant
August 6, 2024
Question

Prepare Form

  • August 6, 2024
  • 1 reply
  • 351 views

I'm trying to edit fields that are tied to a drop down menu.  For example, I have a box that has multiple data points entered into it.  When you select one, it will populate another box on the sheet.  I cannot figure out how to edit the data being populated depending on what choice you make.  In the attachment, the box that shows 1-12 will auto populate the info in the larger box below it.

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
August 6, 2024

Do you want the text in the text field to be editable by the user?

Participant
August 6, 2024

No.  I'd like it to just be what we "pre-load".

try67
Community Expert
Community Expert
August 6, 2024

OK, then let's say the drop-down is called WorkRuleViolated. As the custom Calculation script of the text field enter something like this:

 

var wrv = this.getField("WorkRuleViolated").valueAsString;
if (wrv=="1-12") event.value = "No employee is to be lifted...";
else if (wrv=="13-20") event.value = "Some other text...";
else if (wrv=="21-30") event.value = "You get the gist...";
else event.value = "";