Changing visible parts programatically - InfoPath Dev
in

InfoPath Dev

Changing visible parts programatically

Last post 11-16-2009 08:53 AM by nebuk. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 11-12-2009 05:53 AM

    • nebuk
    • Top 500 Contributor
      Male
    • Joined on 09-14-2009
    • UK
    • Posts 28

    Changing visible parts programatically

    Essentially here is my situation which I am having a huge amount of fun trying to do:

    I will have users designing forms who are not very adept at using infopath, they will have a lot of active x controls made for them which will be doing complex functions else where. Once this user has designed a form with all the parts they want another user will want to fill the form in but as the forms also form a set of instructions I only want them to be able to access/fill In/see (preferably see) one section at a time.

    My idea was to define these sections using the infopath section tools and using a naming convention which will be instilled upon the user (or they will be created as template parts)all the sections would have strong names such as SecSplit.1 (for example).

    Thus when the form is loaded up to be filled in the on load even would loop through all the sections found using the name (which will easily run into the 100's in small cases and possibly 1000's later on) and would create a view for each or only display 1 part at a time. Thus the user filling in the form would then have to use a forward button to go through the sections and any they are revisited need validation to edit.

    Is it possible to do this in infopath so far I have discovered that:
    views do not have strict objects that can be accessed(for modification) or edited
    optional parts can be added/removed to almost simulate this but do not retain data
    apparently you cannot hide objects from within the code of the form as the conditional hides are created within the view files


    Does anyone have any ideas? Or am I trying to build a house out of straw?
    Cheers
    Ben
  • 11-15-2009 04:01 AM In reply to

    Re: Changing visible parts programatically

    Hi Ben,

    Yes, you can do this with a 5NF XML data schema. You shouldn't do it with namespaces. That'll require code and may not work. You can do it with one namespace by just having a very normalized data schema. We've done it before. Makes the designer view huge (lots of conditional hide-show), but it works and is actually pretty cool. Send me email if you have specific quesitons (I'm only in the forum twice a week).

    Good luck!

    Patrick Halstead
    Project Manager at Qdabra
  • 11-16-2009 08:53 AM In reply to

    • nebuk
    • Top 500 Contributor
      Male
    • Joined on 09-14-2009
    • UK
    • Posts 28

    Re: Changing visible parts programatically

    Many thanks for the reply :)
    If I were to use a 5nf would I be able to automate this as the issue is that not only will there be many multiple parts to do this with it may be done 100's of times by inexperienced users.
    Also how would you then do this with the 5nf? I know you said email to reply but its still nice for everyone else to see how things pan out :)
    I have currently got a solution which is close as I have found, as I am using sharepoint I have made some code which runs on a work flow and it:
    takes the files out of the xsn by making it a .cab
    it then takes the view searches through for the groups and takes a copy of each finite sectiion (group) within the first view and creates a new view and after the basic view constructor text to make it a functional .xsl it coppies in the group (group a to view a group b to view b etc)
    it then adds the refrences to these views so they can be seen into the manifest
    then the code repackages these files back to a batch then to .xsn


    if you could go through the weakness in this solution for me that would be really good as its quite good for us as having actually split finite views is also useful for us :)
    Many thanks Ben
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.