Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
maxime66
Creator
Creator

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
Partner - Specialist II
Partner - Specialist II

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

View solution in original post

10 Replies
flipside
Partner - Specialist II
Partner - Specialist II

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

Anonymous
Not applicable

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
Creator
Creator
Author

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
Master
Master

Anonymous
Not applicable

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

yoganantha321
Creator II
Creator II

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
Partner - Specialist II
Partner - Specialist II

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
Creator
Creator
Author

Hi Dave,

i'm gonna do that !

thank you

best regards

And thanks also to all of you

Kushal_Chawda

Apply select in field trigger

Capture.JPG