I am trying to update the description on the ticket with the items that are selected in the multiple checkbox field using a custom script. Currently I am running into a couple of issues.
Example: Multiple Checkbox Field has option 1, option 2, option 3.
When option 1 is selected from the field, the description gets updated with option 1. If option 2 is selected afterward from the checkboxes then the description is updated, but duplicates the first option and adds the section option along the same line. I would like for the script to allow a user to select option 1 to add it into the description and when the user sections option 2 that it adds it to the description in the next line.
The final result should look like this in the description field.
Option 1
Option 2
Here is the basic script I am using but I do not know how to ensure the get value function selects just the option from the checkboxes rather than the whole field.
var description_content=$CS.getDescription();
var Full=$CS.getValue("WorkOrder_Multi_Fields_45601_UDF_CHAR1");
var new_description_content=Full + ' QTY:' +description_content;
$CS.setDescription(new_description_content);