Reference User Profile for the current user?  [SOLVED]

Discuss your general Proclaim related queries here.
Posts: 19
Joined: Mon Sep 27, 2021 11:58 am
Has thanked: 9 times

Reference User Profile for the current user?

Post by coastal_living »

I came across something posted about getting a value from the user profile for the current user and I tried to implement this into a question, but it didn't work - I was just wondering what I might have done wrong?

I have written the below, but when I run the Linked Action, whilst I am logged in, it says "Is this your Security Level: 0". But my Security level is 10.

QUESTION( "Is this your Security Level: " & USER-PROFILE(SECURITY-LEVEL) , "ALPHA" )


Posts: 476
Joined: Wed Nov 30, 2011 10:20 pm
Been thanked: 122 times

Re: Reference User Profile for the current user?  [SOLVED]

Post by steve »


Proclaim doesn't like you using the function 'user-profile' inside another function 'question'.
Instead, first assign the result of 'USER-PROFILE' to a local variable, and use the local variable in the question:

Code: Select all

QUESTION( "Is this your security level: " , PROF , "ALPHA" ) 
seems like an odd thing you are trying to achieve, but I presume this is just test code...