I have created a form with tabs at the top to separate the form into sections. I used the Choice Control and created a panel for each section. I then added rule to each panel. So far so good, tabs worked as I wanted them to. I only have an issue when I open an item in SharePoint i.e. View Properties. I want it to show the first tab Employee Details but instead it defaults to last tab Treatment & Investigation.
Does anybody know how to do this please?
In edit/new mode the form should default to your employer tab because that's the default value. In display (read) mode you can write a rule to display that panel. Use the IsDisplayMode function.
For example if your tab is called employer details and your control is called Tabs then you can write something like this for the panel that hides employer details.
Tabs!='Employer Details' && !(Is Display Mode&&Tabs=='')
This assumes you are not binding the Tabs control to a list column.
1. default value is evaluated just in NEW mode, not in EDIT mode
2. using rules you can manage visibility of the form controls, but you can not set control's value.
so with pure rule approach you will end up with inconsistencies like Tabs control having value related to tab X but panel related to tab Y is being shown.