Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
Correction: the expression is simpler:
=IF(Only(Role) = 'Role A', 'SH01', 'SH02')
That's it.
Good luck,
Peter
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.
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,
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.
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
Correction: the expression is simpler:
=IF(Only(Role) = 'Role A', 'SH01', 'SH02')
That's it.
Good luck,
Peter