Force Mandatory Variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2023 02:37 PM - edited 11-08-2023 08:39 PM
Hi Connections,
I have a variable. Safe Updating with three choices, when safe updating is selected, I want to push user to fill any ONE of the below variables, Standard User Role OR Safe Manager Role. How can I achieve this. any suggestions... to show that two variables i have created UI policy to appear on the form when safe updating is selected....
appreciate any help.
Best Regards,
Rafmine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2023 08:46 PM
Hi @Community Alums ,
Plz try below code. Here instead of AND condition we will use OR condition
function onSubmit() {
//Type appropriate comment here, and begin script below
var abc = g_form.getValue('add_user_safe');
var stdRole = g_form.getValue('standard_user_role');
var safeMgrRole = g_form.getValue('safe_manager_role');
if(abc == 'true' && (stdRole == '' || safeMgrRole == '')){
alert('Kindly fill the Standard User Role Value & Safe Manager Role Value');
return false;
}else{
return true;
}
}
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2023 09:10 PM
Hi Danish,
I use the below code but my no luck...
don't know where i'm moving wrong...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2023 09:18 PM
Hi @Community Alums ,
Safe updating must be a label type variable right?
Can u send me screenshots of the variables u have created in the backend?
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2023 09:21 PM
Hi Danish,
Kindly find the below Screenshot as requested...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2023 09:24 PM
@Community Alums ,
Thanks for the snip. What is the backend name of Add user to safe?
I presume on selection of that option u are getting those 2 fields right.
Can u let me know the backend value for Add user to safe.
Screenshot of multiple choice of safe updating variable.
Thanks,
Danish