Open specific tab - Possiblity to open specific tab on conditions
Original Post by Django (Imported from Ardevia Forum)
Is there a way to open a specific tab:
- either upon opening form (conditions could be a certain value of an existing field or a user profile property meeting a certain condition or user being a member of a certain (SharePoint or Security) group
- or upon clicking a button
-
Original Post by Andrii Katsiubka (Imported from Ardevia Forum)
Yes, it is possible with actions.
If you want select tab on form opening you should add Form Load Action.
If you want to select tab by clicking on button or link you should add link or button with actions.To select tab you need to add Execute Script action with next code:
CodejQuery("<tab-selector>").click()
Don't forget to replace <tab-selector> by selector of your tab.
To make it workable only for users in specific group add next code to Condition field of this action
Code[[@User.IsMemberOfGroup("<Name of the group>")]]
and replace <Name of the group> by users group name0 -
Original Post by Django (Imported from Ardevia Forum)
Thanks for replying!
Wat do you mean by the "selector of your tab" - I guessed it would be the name of the tab but that does not seem to work... the order of the tabs in numbers is also not working...0 -
Original Post by Andrii Katsiubka (Imported from Ardevia Forum)
By selectot I mean jQuery Selector.
In you case you need to open Developer Tools (F12 in any browser)
Click on select element button and select tab.
Then in html find element id (see image)
In an example element id is "ui-id-2" so jQuery selector will be "#ui-id-2"
0 -
Hello,
I also want to set the focus on a tab (belongs on a condition) so I tried the solution above.
My Problem is, that some Tabs have the same element id?! The solution works fine with tabs wich have a unique ID.
Does anybody have a hint for me?
Greetings
Mike
0 -
0
-
Another tip: in a scenario where you for instance want to add a button to the default "save" action like "save and add documents"; as the last action of that new button you can redirect to the editform.aspx?id=[[ID]]&TabSelected=9
Then in the editform execute the jQuery script action with the condition:
=[[@Page.GetQueryString('TabSelected')]]==9
It will redirect users to the editform.aspx with the right tab opened for them to start adding documents (for example).
Cheers!
Jeroen0
Please sign in to leave a comment.

Comments
6 comments