Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
kkkumar82
Specialist III
Specialist III

Trigger to next sheet - Regarding

good afternoon,

I have a requirement like when I click SalesmanID in list box it should navigate me to the next sheet. I have achieved this by going to the field event triggers "on select" but I found some thing strange.

Lets assume in the attached file

Main sheet : SalesmanId

Sheet 1: some table

Sheet 2: another table

What I am getting is when I click in salesmanId in main sheet, it is navigating me to sheet1 and let us assume if I goto sheet2 and press "clear" it is again navigating to sheet1 which I don't want, in my original application also its happening if I am there in any sheet pressing clear, it is navigating to the sheet1 where I kept the original navigation.

Any suggestions here.

Kiran kumar

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

That's exactly the reason you should avoid using triggers to create this kind of magic behavior. In this case you could use a conditional expression that uses GetSelectedCount() to check if you have only one selected value in the field you're interested in. Something like =If(GetSelectedCount(SalesmanId)=1, 'SH02')


talk is cheap, supply exceeds demand

View solution in original post

11 Replies
Chanty4u
MVP
MVP

chk sample same req i had previous.

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

That's exactly the reason you should avoid using triggers to create this kind of magic behavior. In this case you could use a conditional expression that uses GetSelectedCount() to check if you have only one selected value in the field you're interested in. Something like =If(GetSelectedCount(SalesmanId)=1, 'SH02')


talk is cheap, supply exceeds demand
sunny_talwar

May be use this:

=If(SubField(GetActiveSheetId(), '\', 2) = 'SH01', 'SH02')

Chanty4u
MVP
MVP

u can create dummy dimension

in script lik

salesmanid as salesmanId1 

and u can use this in  document properties  triggers  lik belowonselect.PNG

tresesco
MVP
MVP

=If(GetSelectedCount([Salesman ID]), 'SH02')

However, it seems a bit surprising to me as well. I read somewhere that 'Clear' is caught by only 'OnAnySelect'. May be this behavior has changed in newer versions.

kkkumar82
Specialist III
Specialist III
Author

Hi Chanty,

Thats what I want similar to yours even after clearing it should not navigate to the original sheet where I kept the navigation.

Can you tweak my file.

Kiran Kumar

Chanty4u
MVP
MVP

As for ur data i dnt hve reload option..

u can try  by creating dummy dimension  as i mentioned abve screen shot.....and apply trigger

kkkumar82
Specialist III
Specialist III
Author

Thanks Gybbert

It worked

kkkumar82
Specialist III
Specialist III
Author

Is this I Should use If I want to navigate only from Sheet 1 to Sheet 2 Sunny.