- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2023 10:30 PM
I have one requirement, I need to Display multiple text sentences based on choice field value selection, How can I achieve this requirement
!!Thanks in advance.
Regards,
APV Babu
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2023 12:14 AM - edited 11-21-2023 12:17 AM
Hi @APV Babu ,
Please find the below code . You need to create an onChange client script
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var taskTemplateName = g_form.getValue('task_template_name');
var descriptionField = 'description'; // Change this to the correct field name
switch (taskTemplateName) {
case 'Plan Direction':
g_form.setValue(descriptionField, 'Plan direction/approval of the proposed correction method in writing');
break;
case 'Population':
g_form.setValue(descriptionField, 'Population and additional data points necessary for executing the correction.');
break;
case 'Responsible Party':
g_form.setValue(descriptionField, 'Confirmation from the group responsible for the correction in writing');
break;
case 'Funding':
g_form.setValue(descriptionField, 'Location of the funding for the correction');
break;
case 'Spreadsheet':
g_form.setValue(descriptionField, 'The Adjustment Consultant Spreadsheet that captures the correction process in writing.');
break;
case 'Additional Info':
g_form.setValue(descriptionField, 'Additional information is needed in order to process the requested correction.');
break;
default:
g_form.setValue(descriptionField, ''); // Clear the description if no match is found
}
}
}
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2023 10:36 PM
Hi @APV Babu ,
Can u provide a scenario please like if choice field value is something then description should be something
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2023 12:08 AM
@Danish Bhairag2 , @Samaksh Wani
I need to populate below "Description" text in Description field when Task Template Name field value changes
1.Task Template Name: Plan Direction
Description: Plan direction/approval of the proposed correction method in writing
2. Task Template Name: Population
Description: Population and additional data points necessary for executing the correction.
3. Task Template Name: Responsible Party
Description: Confirmation from the group responsible for the correction in writing
4. Task Name: Funding
Description: Location of the funding for the correction
5. Task Template Name: Spreadsheet
Description: The Adjustment Consultant Spreadsheet that captures the correction process in writing.
6. T ask Template Name: Additional Info
Description: Additional information is needed in order to process the requested correction.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2023 12:14 AM - edited 11-21-2023 12:17 AM
Hi @APV Babu ,
Please find the below code . You need to create an onChange client script
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var taskTemplateName = g_form.getValue('task_template_name');
var descriptionField = 'description'; // Change this to the correct field name
switch (taskTemplateName) {
case 'Plan Direction':
g_form.setValue(descriptionField, 'Plan direction/approval of the proposed correction method in writing');
break;
case 'Population':
g_form.setValue(descriptionField, 'Population and additional data points necessary for executing the correction.');
break;
case 'Responsible Party':
g_form.setValue(descriptionField, 'Confirmation from the group responsible for the correction in writing');
break;
case 'Funding':
g_form.setValue(descriptionField, 'Location of the funding for the correction');
break;
case 'Spreadsheet':
g_form.setValue(descriptionField, 'The Adjustment Consultant Spreadsheet that captures the correction process in writing.');
break;
case 'Additional Info':
g_form.setValue(descriptionField, 'Additional information is needed in order to process the requested correction.');
break;
default:
g_form.setValue(descriptionField, ''); // Clear the description if no match is found
}
}
}
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2023 12:32 AM
Thanks!!! It's Working😊