• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 573
  • Last Modified:

Appending Roles

@IsMember("[Sales]"; @UserRoles)

How would I add another role to this?

[PMMEMEA]

would it be something like this

@IsMember("[Sales]":"[EMEAPMM]"; @UserRoles)
0
Jaziar
Asked:
Jaziar
  • 4
  • 4
  • 3
  • +2
1 Solution
 
HemanthaKumarCommented:
Right, (@IsMember("[Sales]":"[EMEAPMM]"; @UserRoles)) means that user has both the roles enabled...

What is that you want to check or do ?

~Hemanth
0
 
JaziarAuthor Commented:
I want the user can be in one or the other not both
0
 
p_parthaCommented:
That's get tricky as there might be a logical flaw.. i would try this:

!@IsMember(@UserRoles; "[Sales]") & 
!@IsMember(@UserRoles; "[EMEAPMM]")
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
CRAKCommented:
I usually check with:

@Userroles *= "[Sales]":"[EMEAPMM]"
0
 
p_parthaCommented:
But crak, he wants to hide it , if the user has both the roles

Partha
0
 
HappyFunBallCommented:
That's not exactly right partha - the parameters are backwards.

This should work:

(@IsMember("[Sales]"; @UserRoles) | @IsMember("[EMEAPMM]"; @UserRoles)) & 
!@IsMember("[Sales]":"[EMEAPMM]"; @UserRoles)

That says, return 1 if Sales Or EMEAPMM roles are selected but not both.
0
 
CRAKCommented:
Hmm.... I overread that bit.
In that case I guess there's nothing left to add other that to congratulate you!
;-))
0
 
CRAKCommented:
I don't see the full features of that one yet (I'm getting tired), but HappyFunBall does have a point Partha:
What if the user has neither?
0
 
p_parthaCommented:
Yeah funball is right Crak.. Hide whens are always Head aches...:)

Partha
0
 
JaziarAuthor Commented:
The user may not have either. I also hate hide statements!!!!
0
 
CRAKCommented:
Then why do you keep trying? There are loads of other challenges!
I once found getting a headacke a pretty good reason to try to stop bumpung my head against things.
Worked well! Saved lots on painkillers too!
0
 
p_parthaCommented:
Jaziar,
If funball's logic also not fits for you, then put down the requirements explaining exactly what do u want

Partha
0
 
JaziarAuthor Commented:
Never thought about not bumping my head Crak - WOW
Funball's logic works for me - You guys have a good weekend and buy yourself a beer with the savings from the painkillers.  Thanks to all of you
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 4
  • 3
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now