I'm building a SharePoint app with a form utilizing multiple views for different stages. My form has the three standard views "display", "new" and "edit", which are automatically switched when entering the form by InfoPath (no rules yet).
Now I want to add a rule that switches the form to a different view depending on the value of a field. I know how to add such a rule in the load form rules. I added the condition "If field X is Y switch to view Z". Now whenever I open the form and the field X has a value of Y, the new view Z is shown.
My problem is that this rule triggers when the form is opened for viewing and editing. I want it to only trigger if the form is opened in edit mode. I do not want it to trigger if the form is in read only (display) mode.
So my question is: how to create a rule that will not trigger if the form is opened in read only mode?