Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

qliklearnervir
New Contributor III

Set field value on behalf of other field

Hi,

I want to create a scenerio where i have 2 field ...Arrival Period Code & Booking Period Code;;;

Values are

Arrival Period Code                        Booking Period Code

P1                                                 P1

P2                                                 P2

P3                                                 P3

P4                                                 P4

P5                                                 p5

As per my requirement i want to set an value for Arrival Period Code and same value for Booking Period Code.

and list box should be one.

Period code

P1

P2

P3

P4

P5

Is it possbie that from 1 list box ...i can select 2 filed values at a same time...

6 Replies

Re: Set field value on behalf of other field

You sure can, you need to create a link table to do this:

LinkTable:

LOAD [Arrival Period Code] as [Period Code],

          [Arrival Period Code],

          'Arrival' as Flag

Resident Table;

Concatenate (LinkTable)

LOAD [Booking Period Code] as [Period Code],

          [Booking Period Code],

          'Booking' as Flag

Resident Table;

MVP
MVP

Re: Set field value on behalf of other field

You can user trigger to do so or create a new link table in the script. All depend on how your data model is. Try to share your sample qvw.

Re: Set field value on behalf of other field

Another way is create the inline table and use field event triggers to select the values in both the field

PeriodCode:

LOAD * inline [

PeriodCode

P1

P2

P3

P4

P5 ];

Now when you select any value , you set the Field event trigger on field PeriodCode to select the values in field Arrival period code and Book period code

qliklearnervir
New Contributor III

Re: Set field value on behalf of other field

Hi Kushal,

Can you please explain more on this trigger............

Re: Set field value on behalf of other field

MVP
MVP

Re: Set field value on behalf of other field

PFA

Community Browser