- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2024 08:13 AM
GOod Day
i have a requirement where i have no idea where to go.
I have a Request form where different users will use but i want to have certain fields/variable to display or set to read only base on the logged in user Group Membership.
ex. John Smith is apart of "Group A"
Jane Doe is apart of "Group B"
Group A users will only see start date field /variable and the end date field /variable is hidden or read only
While Group B will have the start date field /variable hidden or read only while the end date field /variable they can modify
how can i:
1) detect the logged in user if they are belonging to a specific group
2) using the IF Statement i can determine if they belong to the Group A or Group B (this is the easy part)
i just need to know if they belongs to the group in question or not
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2024 06:09 AM
i was able to figure it out with a onLoad client script looking for the role
here is my code:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2024 11:06 AM
didnt work here is what i have
Client SCript:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2024 12:07 PM
Hi @Peter Williams ,
The Business rule should run on display.
Try below client script:
function onLoad() {
if (g_scratchpad.memberBC == 'true'){
g_form.setValue('type', 'Business Center');
g_form.setReadOnly('type', true);
}
else {
g_form.setReadOnly('type', false);
}
}
If my response helped you, please click on "Accept as solution" and mark it as helpful.
- Saloni
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2024 12:34 PM - edited 02-16-2024 12:35 PM
Hi @Peter Williams,
So you want to lock down variables of a RITM depending on the user's membership?
If so, there is a much easier way to get this done but you may need to create a custom role.
- Open the variable record
- Under the 'Permission' tab, you can set 'Read role', 'Create roles', and 'Write roles', which controls users' permission to that particular variable.
I hope it helps, thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2024 06:42 AM
well that is not what i was looking for.
i know how to do this already for permissions on the field
i want to be able to have a select box get update by the users Group member ship or by their Role
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2024 06:09 AM
i was able to figure it out with a onLoad client script looking for the role
here is my code: