Switching to ReadOnly view based on input parameters - InfoPath Dev
in

InfoPath Dev

Switching to ReadOnly view based on input parameters

Last post 09-01-2013 03:26 PM by Patrick Halstead. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 08-27-2013 07:45 AM

    Switching to ReadOnly view based on input parameters

    Hey all. Basically i have a form that does a "GET" if there is an input parameter (ID), otherwise it sets up for a post. The "GET" action is checked on the Form_Loading event in the code behind. If we do indeed get an ID, I would like to switch to my readonly view where the user must then click a button in order to edit. How would I go about this. I cannot do a this.viewInfo.SwitchView("x"); on form load, because it causes an error stating the view is not ready, which makes sense. And unfortunately the formLoad rules run before the code behind. Any ideas are welcome, thanks in advance.
    Filed under:
  • 09-01-2013 03:26 PM In reply to

    Re: Switching to ReadOnly view based on input parameters

    Have your code behind set a field in your main data source (or a secondary one, for example, you could add an XML file with "state" fields as a resource). Then, add a rule to that field which has an action to switch the view. :)

    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.