- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2025 11:10 AM
I have the following form:
What I am trying to do is, when 'Operational work type' is selected, I would like to 'Work category' to to populate as well. I have the following client script, but it is not working:
Am i missing something? Please help!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2025 11:40 AM
Since your custom field that you're trying to set is on the task table, not resource plan, use:
g_form.setValue('task.u_work_category', '4');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2025 11:16 AM
Hi Jen,
Verify that the selected value (not text/label) of the choice field is 'admin', and your custom field name and value are correct. You can add an alert on newValue to verify that the if condition is satisfied.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2025 11:18 AM
Hello @Jen11 ,
Did you print the value of "Operational work type", add this line of code before the if condition,
g_form.addInfoMessage("Value of work-type: "+newValue);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2025 11:20 AM
i double checked and everything is correct:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2025 11:40 AM
Since your custom field that you're trying to set is on the task table, not resource plan, use:
g_form.setValue('task.u_work_category', '4');