Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
Not applicable

Triggers help - When i select a field, one more field should also get selected

Hi Everyone,

I have a condition when ever we select a field it should also select 1 other field. I dont know how to put it. Suppose if we have 2 fields 'A' and 'B'. When ever I select something from 'A', value in field 'B' should also get selected by default. Its like clicking once and selecting 2 different fields. I know that I have to use triggers to achieve this, but I couldn't get it done. 

Please help.

Thanks,

Abhi

1 Solution

Accepted Solutions
MVP
MVP

Re: Triggers help - When i select a field, one more field should also get selected

4 Replies

Re: Triggers help - When i select a field, one more field should also get selected

What would be the basis for the selection? Will A and B have the same exact values?? It would be ideal if you can pull together a sample.

Best,

Sunny

bdiamante
New Contributor III

Re: Triggers help - When i select a field, one more field should also get selected

Set an OnSelect trigger on [Field A]. Go to Settings -> Document Properties -> Triggers (tab). Under the Field Events header, find [Field A]in the list and then click the Add Actions button under OnSelect.

The parameters should be:

Action type: Select in Field

Field: [Field B]

Search String: the value that should be auto selected in Field B. If it's exactly what is selected in Field A, you could use:

getFieldSelections([Field A])

if Field A is not in the default state, try:

'(' & concat({State-Name} distinct [Field A], '|') & ')'

Alternate State: Choose the state where you want the selections to be made in Field B. Leave blank if you are using the default state.

Brian

MVP
MVP

Re: Triggers help - When i select a field, one more field should also get selected

Not applicable

Re: Triggers help - When i select a field, one more field should also get selected

Thats it, Massimo. Thats exactly what I was looking for. Thanks you so much and thanks to rwunderlich