AnsweredAssumed Answered

Page Display Condition

Question asked by pbosmia on Aug 28, 2012
Latest reply on Jul 14, 2017 by Danpego
Hi Everyone,

I have a requirement to only show the page A in project if user logged in either PM or few other fields.

I checked and could not find a function the check the user but can only find a function for checking user group, looking up a person etc. So I tried below

Please note Page is not secure or anything

STEP 1

I created a query based lookup called USER_LOGGED_IN

SELECT
@SELECT:1:sid@,
@SELECT:s.ID:ID@,
@SELECT:s.full_name:full_name@
FROM
srm_resources s
WHERE
s.user_id = @WHERE:PARAM:USER_ID@
and @FILTER@

Hidden key as sid and return full_name

I made sid id static as "1" and I will always get only 1 record in lookup i.e. the user logged In.

STEP 2

In my display page condition I type below

( project.manager_id == lookup("USER_LOGGED_IN",1) )

Pressing evaluate button I get

( project.manager = "NAME OF USER" )

Now if I go to the project I still don't see the page If I am the PM of the project.


I even logged In as other user to check the display condition and the condition builds perfectly fine (showing user who is logged In) , but some how Clarity doesn't check it when I am opening the project?

Has anyone tried anything similar ....


Thank you,

Pavan

Outcomes