Open submitted forms in saved view - InfoPath Dev
in

InfoPath Dev

Open submitted forms in saved view

Last post 07-09-2009 12:30 PM by Dragonight. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 07-08-2009 07:06 PM

    Open submitted forms in saved view

    Hi,

    I have one form uploaded for users to fill out.  However, this form has 11 different views for 11 different departments, but all of the views share in common name fields, date fields, department representative fields, etc.  Whenever a form is filled out and saved/submitted, it does this fine, but when it is opened back up, it always opens in the default view, and not the view it was actually filled out in, so the shared fields are filled out, but the rest isn't until you switch to the right view.  How do I fix this so the saved forms open in the view they were filled in?  I have a field that makes the user select the view they are filling out, so I can refer to that field, if that helps.  I've tried using rules, but it's not working out quite right.

    Thanks.

    (Sorry, posted in wrong forum first time)

  • 07-08-2009 08:52 PM In reply to

    Re: Open submitted forms in saved view

    IP doesn't remember or care what view you were in when you saved it.  It always opens to the default view unless you tell it otherwise.  You tell it otherwise by setting rules in Tools > Form Options > Open and Save > Rules.  This will execute rules upon the form opening, and one of the actions is to switch view, which you are already familiar with.  You need to add some hidden logic to the form that tells it where to open based off who is opening and/or how it was submitted.  You may need to set a flag in a hidden field upon submit that corresponds to the view by name or number.  This would be written to the field using a rule just before your submit to wherever it's submitted.  Then, upon opening there would be a bunch of rules, each with its own condition that says to open to the proper view based on that field.  Likewise, if it's based on user, you could check the user's department from AD using a web service and switch to that department's view automatically.

  • 07-09-2009 10:50 AM In reply to

    Re: Open submitted forms in saved view

     So if I edit the properties of the submit button, I can select "submit using custom rules" and create 11 different rules, based on each view and say, "If the department is equal to __dept name___ switch view to __dept name___"?

     

    I'm not sure what you mean by a "hidden field" - how do you enable hidden fields?

    Filed under: ,
  • 07-09-2009 11:04 AM In reply to

    Re: Open submitted forms in saved view

    Not on the submit button -- I think you want to do this in Open rules. Under Tools / Form Options / Open and Save there is a place for rules that run on open.

    Hilary Stoupa

  • 07-09-2009 11:20 AM In reply to

    Re: Open submitted forms in saved view

     I created 11 new rules in Open & Save, but it doesn't solve the problem...  I created the rules under the "Open" rules, becaue "save" rules aren't supported for browser enabled forms.  My rules were in this format:

     

    Condition:  Department (a field on my form the users select that corresponds to the view they are filling)  is equal to "Administration"

    Action:  Switch view to "Administration"

    etc.

     

    All 11 rules look like that, just other names are used - "Customer Support", etc.

    Filed under:
  • 07-09-2009 11:43 AM In reply to

    Re: Open submitted forms in saved view

    I'm sorry to be thick, but when you say it doesn't solve the problem.... why not? Are the rules not working correctly? If not, are you sure the value of your department field is what you expect (that is, if it is a drop down, the value may be an id like 1, 2, or 3 while the display is Administration, Customer Support, etc.)?

    Hilary Stoupa

  • 07-09-2009 11:46 AM In reply to

    Re: Open submitted forms in saved view

    +1 to Hilary.  If your conditions are proper with PERFECT syntax, then this definitely will work.  You have to make sure that the values for your dropdown selections are EXACTLY the same as what you put in your conditions.  The DisplayName is not necessarily the same as the Value, and even if your DisplayNames are exactly the same as your Values, you still have to type in or choose the _exact_ text in your conditions for the rules with no variation.

    As a bit of advice for testing now and in the future, I would highly suggest not iterating your solution 11 times before testing.  Simply build one instance as a proof of concept and troubleshoot it until it works.  Then, go make the other 10 the same way...

  • 07-09-2009 12:07 PM In reply to

    Re: Open submitted forms in saved view

     All of my DisplayNames are exactly the same as their corresponding Value names and I copied and pasted the names to make sure they were the same and republished my form, but the saved forms still don't open in the view they were submitted in.

  • 07-09-2009 12:17 PM In reply to

    Re: Open submitted forms in saved view

    Attached to this reply is a sample. Right click the link in the header and select save as. Open in design mode and save locally so you can open it and fill it out. New forms always open in the default view, but select TEST 2 or TEST 3 from the ddl before saving and closing. Open your save XML and it will open in the view with the title of the selection in the drop down...

    Hilary Stoupa

  • 07-09-2009 12:30 PM In reply to

    Re: Open submitted forms in saved view

     Ok, I fixed the problem - it turns out I had the name of my field wrong as I have a two Department fields that are slightly different and I used the wrong one.  Thank you both so much for your patience and help - I know that's what you were both saying all along.  I really appreciate it. =)

Page 1 of 1 (10 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.