Hiding Form Sections Based on User Group

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2014 09:52 AM
I am trying to hide a form section based on a users group, which is not listed on the form itself.
I tried the following client script and it's doesn't hide the tab.
function on Load(){
var me = g_user.userID();
if (me.isMemberOf('7efcb8956fa21100dd3253eabb3ee40c'){
var sections = g_form.getSections();
sections[3].style.display = 'block';
} else {
sections[3].style.display = 'none';
}
}
Any help as to what I can do to get this to work would be appreciated!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2017 04:48 AM
Please mark correct/helpful if it has helped you.
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2017 05:33 AM
still not working. 😞
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2017 05:39 AM
Hi,
if ((approvalstatus=='Approved' || approvalstatus=='Limit Changed Addressed' || approvalstatus=='Limit Change Finalized') && (person.isMemberOf('T&E Credit Card Team')))
{
{sections[1].style.display = 'block';}
{sections[2].style.display = 'block';}
alert('checking done');
}
Replace your code with this and see.
Thanks,
Vinitha.K
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2017 05:52 AM
i will reply you tomorrow morning.
i am leaving for home.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2014 07:45 AM
I would do all the checking in the BR and have the BR return true or false. Then the client script can hide or show based on that.