Hello,I have a question with the visibility roles of a site page. I have three sites (request, management, new) and in each. For example"=isusermemberofgroup(tostring(loggedInUser()), a!groupsByName("managers"))" but I can not see or see a page if I get a different role
Discussion posts and replies are publicly visible
I can't tell what you're asking. What are you expecting or hoping to happen? What are you experiencing instead?
Title Icon Content VisibilityConsultation C_PM_consultationSol =isusermemberofgroup(tostring(loggedInUser()), a!groupsByName("managers"))Management C_PM_managementSol =isusermemberofgroup(tostring(loggedInUser()), a!groupsByName("analyst"))Registration C_PM_registrationSol =isusermemberofgroup(tostring(loggedInUser()), a!groupsByName("managers"))
I need these roles for these sites and I do not know how to do it:manager: registration and consultationanalyst: management and consultation
Hi Alejandro - you need to think in terms of "sets". You will have one "set" (or Group) that represents Managers, another for Analysts; and then you need 3 other "sets" (Groups) that represent the roles of: Consultation, Management and Registration.
Your Consultation Group needs to contain: the Manager and Analyst groups
Your Management Group needs to contain: the Analysts group
Your Registration Group needs to contain: the Manager Group
Your visibility rules will then refer to the relevant group from the second set.
Note: it's better to use constants to hold references to groups than use the a!groupsByName() because a Group's name is not immutable - someone might edit that Group and change its name. But a constant of type 'Group' will act as a permanent pointer to the Group even if the Group's name is changed. Where you need a list of the Groups, re-use the ones you've created as single constants and write an Expression Rule to return the list of those Groups
Your code should look something like this:
Title Icon Content VisibilityConsultation C_PM_consultationSol =isusermemberofgroup(tostring(loggedInUser()), rule!XXX_ER_GROUPS_CONSULTATION)Management C_PM_managementSol =isusermemberofgroup(tostring(loggedInUser()), cons!XXX_GROUP_ANALYST)Registration C_PM_registrationSol =isusermemberofgroup(tostring(loggedInUser()), cons!XXX_GROUP_MANAGER)
Hope this helps
S>
Thanks so much for your answer
In addition to Stewart's answer which I agree with all of it, I would also recommend that you set up a separate expression rule to handle the visibility for each different site page. So something like "PREFIX_SitePageVisibility_Consultation()", which accepts 1 parameter of username, and contains the necessary group-checking code within it. This will allow you to test the result of the visibility expression easily across a variety of users (just put in different usernames in the test input), and makes future adjustments easier (since you don't need to edit the site setup to make small changes).
When I try to use that function within an expression rule, I do not it recognizes it. Is it in a plug-in package or can I find it for see how it is used?
What function? Are you talking about the example expression rule name I used in my last comment?
aah, Sorry. I had understood other things, and how could he do it?. is that I'm starting a saber uses appian