Qlik Community

QlikView Security & Governance

Discussion Board for collaboration on QlikView Security and Governance.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

If field omitted, show another field

Have two fields

unencrypted_number - this is omitted for most users

encrypted_number - everyone can see this

For a dimension in a graph , I want to say "If unencrypted_number is omitted use encrypted_number, else use unencrypted_number"

Can this be achieved?

Many thanks,

Michael

1 Solution

Accepted Solutions
dgreenberg
Not applicable

Re: If field omitted, show another field

This is not an elegant solution but could be the start for you.

Add secretField as an expression

then add another expression that says

if(len(column(1))>=1,secretField,publicField)

I am sure you could say if (lefn(secretField))>=1 as well.

Hope this gets you started.

Dan

4 Replies
MarcoWedel
Not applicable

Re: If field omitted, show another field

please post sample data/app

regards

Marco

Not applicable

Re: If field omitted, show another field

Attached is .qv.

data is inline. admin is admin...user 1 can't see secret field, user 2 can, so if user 1 is logged in, I want the diemsion of the graph to change from secretField to publicField

Thanks,

Code

Section Access;

LOAD * INLINE [

  ACCESS, USERID, PASSWORD,OMIT

  ADMIN,admin,admin,

  USER,user1,user1,secretField

  USER,user2,user2,

  ];

  Section Application;

myData:

LOAD * INLINE [

    secretField, publicField, sales

    1111, xxxx, 21

    2222, yyyy, 42

    3333, zzzz, 53

];

dgreenberg
Not applicable

Re: If field omitted, show another field

This is not an elegant solution but could be the start for you.

Add secretField as an expression

then add another expression that says

if(len(column(1))>=1,secretField,publicField)

I am sure you could say if (lefn(secretField))>=1 as well.

Hope this gets you started.

Dan

Not applicable

Re: If field omitted, show another field

not the most elegant as you say but it works

tyvm