How do you insert a view's name in the form - InfoPath Dev
in

InfoPath Dev

How do you insert a view's name in the form

Last post 03-07-2007 01:01 PM by Clay Fox. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 03-06-2007 09:18 AM

    • lou131
    • Top 100 Contributor
    • Joined on 02-13-2007
    • USA
    • Posts 89

    How do you insert a view's name in the form

    Hi,

    Question:

    How do you insert the current view's name into a field on the form?

    Thanks
    Lou
  • 03-06-2007 10:15 AM In reply to

    Re: How do you insert a view's name in the form

    This may be more complex than it apears but...

    If you just need the name of the current view, to display in the form for that view, I just usually type it in somewhere as a header. You could also set a field or expression box with the name.
    If you wanted a field that always contained the current view, you would need to set this with the name of the view when you switch to that view. So each time you changed views you would need to update the field value via rules.
    There is no built in function I know of, it would need to be managed manually.

    Clay
  • 03-06-2007 10:39 AM In reply to

    • lou131
    • Top 100 Contributor
    • Joined on 02-13-2007
    • USA
    • Posts 89

    Re: How do you insert a view's name in the form

    Thanks for the info....this all plays into a prior posting concerning the following: if you have any detail info (coding, rules) on how to make this happen, it would be appreciated.

    I have a form with 6 views. How do I get the form to open in the view it was saved in. It only opens in the default view I published the form in. I'm using Sharepoint to publish my form.

    I see that you can change the open/save behavior in form options but I don't know the code or the rules to make it happen.
  • 03-07-2007 01:01 PM In reply to

    Re: How do you insert a view's name in the form

    Once you have your field setup that you will use to store the current view status (ViewStatus). This field will have a from the view name of the save view for a previously completed form. In From Options, open rules you would create a rule with a condition (ViewStatus = "Save") that will switch views to save.

    For an example.

    For code you would create a variable that you would update at every view change or at least as part of the save routine. Then in Form Open check this field and change views accordingly.

    I personally think that using a field and rules is simpler and easier to manage. You can always use the field value in your code.

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