- 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-21-2023 12:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2023 10:37 PM
Hello @APV Babu
You need to write a onChange Client Script :-
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
var choice=g_form.getValue('choice_field_name');
var res=choice +'\n';
g_form.setValue('description',res);
}
Plz mark my solution as Accept, If you find it helpful.
Regards,
Samaksh