How fast loggedInUser() function is?

I have some UI elements that depends on current user.

Should I use loggedInUser() function every time or it's better to have it saved within load() function and passing as a parameter into inner rules?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    I would also add that using a local variable can be very helpful when it comes time to test - in other words, if you need to test a rule or interface's behavior when it sees a specific username, if you have "loggedinuser()" at several places in your rule/interface, you would need to replace those with the username you want to test, then undo that later. If you have 1 local variable set, however, you just need to quickly swap in the username to test, then switch it back, all in that one spot.
Reply
  • 0
    Certified Lead Developer
    I would also add that using a local variable can be very helpful when it comes time to test - in other words, if you need to test a rule or interface's behavior when it sees a specific username, if you have "loggedinuser()" at several places in your rule/interface, you would need to replace those with the username you want to test, then undo that later. If you have 1 local variable set, however, you just need to quickly swap in the username to test, then switch it back, all in that one spot.
Children
No Data