Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

maxime66
Contributor

Triggers on SheetActivation

Hi Qlikers

i've created a list of my Sheets Name and i check changes on the filed "onglet" to activate the selected sheet.

(Properties Of document / Triggers / Triggers for events on a field)

This part works well.

I also set a trigger on "RDV" sheet to select specific salesman.

When sheet "RDV" is selected i want "salesman" = "jon" (that works manually but not with the sheet list method below)

any ideas to fix this?

thx by advance.

1 Solution

Accepted Solutions
flipside
Valued Contributor II

Re: Triggers on SheetActivation

Hi Maxime,

Getting triggers to work exactly how you need them can be a bit tricky. What I think is happening is that although the field trigger and sheet trigger work independently, they don't work in combination.

If you are keeping the tab row, then you need to have both types of trigger set up. If not then you can probably avoid the use of sheet triggers. The field trigger needs to also select the relevant salesman, like my earlier code. If you have different values for the salesman field depending on the sheet chosen, you will need to use an if statement, or I would use a pick/match combination (much easier to read than an 'if') like this ...

=pick(match(onglet,'RDV','Actions'),'Jon','Jack')

What this does is look at the value of onglet and match it against the listed values RDV and Actions returning 1 or 2 if there's a match and zero if none found. It then picks value 1 or 2 from the list of salesmen names and this can be applied to the field salesman.

Hope this helps

flipside

10 Replies
Highlighted
flipside
Valued Contributor II

Re: Triggers on SheetActivation

Could you remove the sheet trigger and add an extra action to your field trigger to set the salesman field with this expression ...

if(onglet='RDV','jon','')

flipside

laddu_927
Valued Contributor

Re: Triggers on SheetActivation

Think you  need to create the variable salesman before hand. I tried by creating it in the script and it worked. Please find attchment.

maxime66
Contributor

Re: Triggers on SheetActivation

hi,

Actually i need Salesman to be really "selected" to filter all datas linked to him

NB : The Qvw file that i join, is just an exemple,

real Qvw file has 30 sheets and each one has diffrent triggers ...

beck_bakytbek
Honored Contributor

Re: Triggers on SheetActivation

laddu_927
Valued Contributor

Re: Triggers on SheetActivation

AM unable to get your eact requirement. Can you please explain.

yoganantha321
Contributor II

Re: Triggers on SheetActivation

Max,

I think you have used different dimensions in two sheets try with the same dimension so that it will be automatically selected in mentioned "RDV" sheet

flipside
Valued Contributor II

Re: Triggers on SheetActivation

Hi Maxime,

Getting triggers to work exactly how you need them can be a bit tricky. What I think is happening is that although the field trigger and sheet trigger work independently, they don't work in combination.

If you are keeping the tab row, then you need to have both types of trigger set up. If not then you can probably avoid the use of sheet triggers. The field trigger needs to also select the relevant salesman, like my earlier code. If you have different values for the salesman field depending on the sheet chosen, you will need to use an if statement, or I would use a pick/match combination (much easier to read than an 'if') like this ...

=pick(match(onglet,'RDV','Actions'),'Jon','Jack')

What this does is look at the value of onglet and match it against the listed values RDV and Actions returning 1 or 2 if there's a match and zero if none found. It then picks value 1 or 2 from the list of salesmen names and this can be applied to the field salesman.

Hope this helps

flipside

maxime66
Contributor

Re: Triggers on SheetActivation

Hi Dave,

i'm gonna do that !

thank you

best regards

And thanks also to all of you

Re: Triggers on SheetActivation

Apply select in field trigger

Capture.JPG