Forum Discussion

memerylane's avatar
14 years ago

Rank formula question

We've got a specific business need whereby a number of roles will be passed via SSO upon registration (or prior). Essentially, they divide up into three adult roles and two kids roles. We want to have two different rank tracks with two associated sets of increasing permissions via roles.

 

I'm curious about how to set up rank formulas so that only adults can go up that tier and only kids can go up that tier. I understand that I can use the "roles required" field, but that is either for one role or for multiple roles, BOTH/ALL of which a given users has, correct?


What I'm curious to know is if the rank formula below will allow for users with EITHER the "Main Community" OR "ERP Connect" role (who also have BOTH two logins AND 2880 minutes since registration) to achieve that ranking:

 

(hasRole("Main Community Registered User") || hasRole("ERP Connect")) && ((logins >= 2) && (registrationAge >= 2880))

 

Any thoughts about whether or not I've set this up correctly? Basically, I want to make sure that the formula reads as I described it above, rather than grouping together like this: user has the "Main Community" role OR user has "ERP Connect" AND two logins AND 2880 minutes.

 

Explaining one more way to be safe: two logins and 2880 minutes should be required of ALL users. And then of users who have achieved these requirements, users with EITHER of the aforementioned roles should be able to progress to the rank in question.

 

Does that make sense? And will that formula accomplish it, based on the parentheses and symbols used?

  • MikeD's avatar
    MikeD
    Lithium Alumni (Retired)

    Memerylane - this looks correct to me. I actually implemented this feature for Lithium as a developer, years ago ;)

    • memerylane's avatar
      memerylane
      Expert

      Awesome, thanks!

       

      We'll be doing some SSO testing that incorporates these roles over the next several days, so I will report back as to whether or not it sticks as desired.