Is there a [_THISUSER] keyword?

I am seeing the following message. Is there such an active keyword named “_THISUSER” that we can use? And if so, what is its scope and how is it set?

Screen Shot 2021-01-14 at 11.50.17 AM

It’s just a different notation for referencing the USERSETTINGS(). I use when I need to dereference a Ref stored in USERSETTINGS(). It’s not mentioned much (or at all?) in the docs, but I saw it somewhere and started using it.

3 Likes

I suppose then that it requires having a USERSETTINGS attribute named “User”? If not, how does it know which setting to refer to?

The expression assistant checks for a USERSETTING that matches the parameter, and throws an error if you don’t reference an existing setting. I just tested, and it even considers the default, unused entries as valid, like Option 8, Option 9'.

I’d call this a feature!

1 Like

Just noticed it on the USERSETTINGS table header.
Screen Shot 2021-01-14 at 2.53.10 PM

4 Likes

Oh, I get it!

USERSETTINGS(Roles)

Is the same as

[_THISUSER].[Roles]

5 Likes

At one point, you couldn’t dereference the USERSETTINGS() format in an expression, but the [_THISUSER] format worked.

It works both ways now, and you can even double-dereference.

2 Likes