Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to initialize variable with field value ?

Hi everybody ,

I have an section access in my application  like this :

Load

ACCESS ,NAME , OMITGROUP

FROM myqvd.qvd ;

for any user , the field omitgroup have a diffrent value.

I'll like to initialize a variable with the value of this field when a user log in my application.
Is it possible ?

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

HI,

Try like this

Section Access;

Load

ACCESS ,NAME , OMITGROUP

FROM myqvd.qvd ;

Section Application;

Test:

Load DISTINCT

OMITGROUP

FROM myqvd.qvd ;

Now in variable just use Only(OMITGROUP).

Regards,

Jagan.

View solution in original post

4 Replies
oknotsen
Master III
Master III

What do you actually want to achieve?

May you live in interesting times!
marcus_sommer

By section access be cautious and read the links here Section Access especially the Introductio very carefully.

Your example won't work because you could only use those fields which are specified for section access like:

Load

ACCESS, NTNAME , OMITGROUP

FROM myqvd.qvd where 1 = 1;

and it couldn't be an optimized qvd-load.

Your variable-issue isn't quite clear, do you mean something like:

varUser:

= osuser()

- Marcus

jagan
Luminary Alumni
Luminary Alumni

HI,

Try like this

Section Access;

Load

ACCESS ,NAME , OMITGROUP

FROM myqvd.qvd ;

Section Application;

Test:

Load DISTINCT

OMITGROUP

FROM myqvd.qvd ;

Now in variable just use Only(OMITGROUP).

Regards,

Jagan.

Not applicable
Author

thank yuo , it work now