- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2016 01:26 AM
I have a glide list field on the Server form called Tenants (u_tenants) - this is referring to a custom table called u_tenant.
If the value of this field is KI, i.e., if Tenants = KI, then hide the section CI details from the Server form.
How this can be achieved?? Any help will be appreciated.
Thanks in advance!!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2016 02:57 AM
It can done by writing an onLoad client script -
Script:
function onLoad() {
//Hiding the section CI details for the Server form if Tenant is KPMG Global
var grp = '0a47fe703702da00e4b58f9754990e43'; // Sys ID of Tenant KI
var des = g_form.getValue('u_tenants');
if(des.indexOf(grp)>=0)
{
g_form.setSectionDisplay('ci_details', false); // Hiding the section CI details from the form
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2016 01:41 AM
Hi Kunal,
Write an OnChange client script on the Tenant field. Somewhat like this :
var sections = g_form.getSections();
If(newValue = "KI") {
sections[1].style.display = 'none'; //here you have to give in the braces [ ] the sequence no.of the section you want to hide.
}
else {
sections[1].style.display = '';
}
Please let me know if it works for you.
Thanks,
Arnab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2016 01:55 AM
Hi Arnab,
Thanks for your reply.
Not sure but I guess this might work for on change of Tenant field but my requirement is to hide the section on load of the form based on the value on the field Tenant.
Also, even on change its not working...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2016 02:48 AM
Hi Kunal
You can write onLoad client script -
var sections = g_form.getSections();
var test_Tenants = g_form.getValue('Tenants') ; // Field name
if(test_Tenants == 'KI'){
sections[1].style.display = 'none'; //here you have to give in the braces [ ] the sequence no.of the section you want to hide.
}
else {
sections[1].style.display = '';
}
Thanks,
Pratyush
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2016 02:57 AM
It can done by writing an onLoad client script -
Script:
function onLoad() {
//Hiding the section CI details for the Server form if Tenant is KPMG Global
var grp = '0a47fe703702da00e4b58f9754990e43'; // Sys ID of Tenant KI
var des = g_form.getValue('u_tenants');
if(des.indexOf(grp)>=0)
{
g_form.setSectionDisplay('ci_details', false); // Hiding the section CI details from the form
}
}