Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
polisetti
Creator II
Creator II

Sheet Trigger

Hi QV,

I need to change the sheets depending on the Selection. Consider I have a Role selection. ,if I Click on Role A from the Role field, it should goes to Sheet 1, If I click on Role 2 it should redirect to sheet 2.Will it be possible by writing triggers at document level?

If yes please help me to achieve this thing done.

Thanks in Advance,

Regards,

Polisetti.

1 Solution

Accepted Solutions
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Correction: the expression is simpler:

=IF(Only(Role) = 'Role A', 'SH01', 'SH02')

That's it.

Good luck,

Peter

View solution in original post

5 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Yes, that's possible but you'll need a Field Trigger that fires when changes are made to the Role field.

Go to Settings->Document Properties->Triggers->Field Event Triggers, select your field and use OnSelect/OnChange to activate a specific sheet.

polisetti
Creator II
Creator II
Author

Yeah, but we need to write a specific condition on specific Role. So how to do that ?

I have total 4 Roles, On Role A it should be sheet 1 & For other Roles it should be Sheet 2.

Regards,

Anonymous
Not applicable

Hi polisetti,

Create a variable vRole that takes value from 1 to 4 depending of Role selection, like:

=if(only(Role)='RoleA', 1, if(only(Role)='RoleB', 2, if(only(Role)='RoleC', 3, if(only(Role)='RoleD', 4,))))

and edit the condition to show/hide each sheet like:

=if($(vRole)=1, 1,0)   in sheets you want to show for RoleA

=if($(vRole)=2, 1,0)   in sheets you want to show for RoleB

and so for the others.

Marc.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Put something like:

=IF (Only(Role) = 'Role A', 'SH01',

       IF (Only(Role) = 'Role B', 'SH02',

            IF (Only(Role) = 'Role C', 'SH03', 'SH04')))

In the  Sheet ID field of the Layout->Activate action. Note that you have to change the Sheet IDs to values that exist in your document and correspond to the correct target sheets.

Peter

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Correction: the expression is simpler:

=IF(Only(Role) = 'Role A', 'SH01', 'SH02')

That's it.

Good luck,

Peter