have also tried user.internalid
# general
j
have also tried user.internalid
l
Have you tried user.entityid ?
s
If that doesn't work, you might have to fall back on a user event script (before load, print context, to add a custom field to the transaction with the user's id). Then you can access the user id via the custom field in the template
j
entityid is null too
so weird that I can get user fields except the actual ID
annoying
really don’t want to have to do <#if user.firstname == ‘Bob’>do stuff</#if>
s
I'd recommend the script (or workflow) approach to pass in the id if you can't get it via the standard properties
l
Doesn’t {user} alone return the ID ?
s
i think its
nluser
j
neither ${user} nor ${nluser} work
l
What’s the rest of the code ?
j
just testing like so
<p>Test nluser ${nluser}</p>
this works as expected:
<p>Test user.firstname ${user.firstname}</p>
(fills in the first name of current user)
but for obvious reasons would prefer to reference
user.id
instead of
user.firstname
when doing conditionals
s
super weird,
nluser
should work. if you look at the xml printout of your transaction record (append url with
&xml=t
), you can see all the values within the record.
nluser
is definitely the internal ID of the user accessing the record if you ctrl+f it
might be syntax thing
try ${record.nluser}
worked for me
s
Nice one!
Yup, looks like NS adds the current user's id to the record itself each time the record is loaded.
j
sweet that works
thanks team