- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2024 10:12 AM - edited 03-14-2024 10:25 AM
Hello,
I have 2 variable date fields called "due_date" & "actual_review_due_date". I need "actual_review_due_date" to be auto-populated with "due_date" value when filled out. I also want actual_review_due_date field to be editable. Thank you.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2024 11:57 AM
1. Configure the two date fields as a variable in the record producer.
2. Create a Catalog Client script, with onChange type with the variable name being the due date.
3. Paste the following in the client script
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
g_form.setValue("actual_review_due_date", newValue);
//Type appropriate comment here, and begin script below
}
4. You should now have the actual review due date populate with the same value as the due_date. The actual review due date will be editable as well as we have not set it to read-only.
Please accept the solution and mark it as helpful, if this helped you resolve your issue.
- Davit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2024 11:57 AM
1. Configure the two date fields as a variable in the record producer.
2. Create a Catalog Client script, with onChange type with the variable name being the due date.
3. Paste the following in the client script
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
g_form.setValue("actual_review_due_date", newValue);
//Type appropriate comment here, and begin script below
}
4. You should now have the actual review due date populate with the same value as the due_date. The actual review due date will be editable as well as we have not set it to read-only.
Please accept the solution and mark it as helpful, if this helped you resolve your issue.
- Davit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2024 11:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2024 09:10 AM
Thank you. It worked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2024 11:57 AM
Hi @Andre241,
I am assuming that you don't have to auto-populate the 'due_date' from the 'actual_review_due_date'.
If so, you can write an onChange Catalog Client script on the 'due_date' variable.
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading) {
return;
}
g_form.setValue('actual_review_due_date', newValue);
}
Cheers