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?
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.
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!
Just noticed it on the USERSETTINGS table header.
Oh, I get it!
USERSETTINGS(Roles)
Is the same as
[_THISUSER].[Roles]
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.
User | Count |
---|---|
15 | |
9 | |
9 | |
7 | |
3 |