- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2023 03:55 AM - edited 12-04-2023 08:51 AM
Hello friends,
I am working on a script.
My requirement is that :
1. when the is not selected then field should populate set of records.
2. when the is selected then field should populate different set of records.
How to achieve this.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2023 04:32 AM - edited 12-03-2023 04:33 AM
Hello @Asmita7 ,
You can write the script include and call in reference qualifiers.
javascript : new ScriptIncludeName().FunctionName(g_form.getValue('CheckBoxFieldname');
Script include should be client-callable
getRecordsIDs: function(a){
//Parameter 'a' will contain the checkBox value
if (a==true)
{
// execute the true value logic and return records
}
else
{
// execute the false value logic and return records
}
},
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2023 04:41 AM - edited 12-03-2023 04:42 AM
Hello @Asmita ,
To achieve this, you need to add an advanced reference qualifier to the reference variable.
Please refer below screenshot:
And through script include you need to return the records according to your requirement.
If my answer sloved your problem then please mark as Accepeted Solution and give thumps up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2023 08:09 AM - edited 12-03-2023 08:10 AM
Hi @Asmita7
Option 1 -
You can create on Change client scripts that will execute on change of check box field . and do glideAjax to populate expected records.
Option 2 -
write a script include and call that reference qualifier as -
javascript : new <ScriptIncludeName()>.functionName(current.variables.<variableName of check box field>)
on script include side check the variable value if true or false , execute script as expected.
Option3 -
( Not so technically strong but easy to implement)
Create 2 reference fields with same label name , one for Check box true condition and another for false. add respective reference qualifier as needed .
Write an ui policy to make either of them visible for needed condition.
Kindly consider marking the provided answer as correct if it proved helpful or mark helpful if it has contributed in someway to your query
Thank you and best regards,
Anwesha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2023 04:32 AM - edited 12-03-2023 04:33 AM
Hello @Asmita7 ,
You can write the script include and call in reference qualifiers.
javascript : new ScriptIncludeName().FunctionName(g_form.getValue('CheckBoxFieldname');
Script include should be client-callable
getRecordsIDs: function(a){
//Parameter 'a' will contain the checkBox value
if (a==true)
{
// execute the true value logic and return records
}
else
{
// execute the false value logic and return records
}
},
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2023 04:41 AM - edited 12-03-2023 04:42 AM
Hello @Asmita ,
To achieve this, you need to add an advanced reference qualifier to the reference variable.
Please refer below screenshot:
And through script include you need to return the records according to your requirement.
If my answer sloved your problem then please mark as Accepeted Solution and give thumps up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2023 08:09 AM - edited 12-03-2023 08:10 AM
Hi @Asmita7
Option 1 -
You can create on Change client scripts that will execute on change of check box field . and do glideAjax to populate expected records.
Option 2 -
write a script include and call that reference qualifier as -
javascript : new <ScriptIncludeName()>.functionName(current.variables.<variableName of check box field>)
on script include side check the variable value if true or false , execute script as expected.
Option3 -
( Not so technically strong but easy to implement)
Create 2 reference fields with same label name , one for Check box true condition and another for false. add respective reference qualifier as needed .
Write an ui policy to make either of them visible for needed condition.
Kindly consider marking the provided answer as correct if it proved helpful or mark helpful if it has contributed in someway to your query
Thank you and best regards,
Anwesha