Clearing out sourc code fields not used - InfoPath Dev
in

InfoPath Dev

Clearing out sourc code fields not used

Last post 03-19-2007 04:54 PM by Matt Faus. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 03-12-2007 08:12 PM

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

    Clearing out sourc code fields not used

    Hi,

    Is there an automated way to clear our source code fields that are not used in the form? I think I know why my form is taking so long to load. During the design of it, I made a lot of changes. Hence, when I deleted fields from the form, I was not aware that the source fields remain resident.

    So I have a ton of fields that are not being used and need to be deleted. Is there an easy way to do this?

    Please advise.

    Thanks
    Lou
  • 03-13-2007 12:15 AM In reply to

    Re: Clearing out sourc code fields not used

    Hello

    Please read the link below
    http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=2593
    Kalyan G Reddy
    Infopath MVP 2007 and 2008
  • 03-15-2007 08:53 AM In reply to

    Re: Clearing out sourc code fields not used

    I think Kalyan did not understand what you were trying to accomplish. His link is for setting fields you use to a blank value. I believe you are wanting to clean up excess fields in your schema now that you have gone through the learning curve and your form is ready for production. I have always longed for a way to find if a field was actually being used; in a view, assigned a value, used in a rule, etc. However there is nothing built into InfoPath to do this and I have not come across any method to approximate it. I know there must be a way to analyze the template files directly but I have not seen anything packaged to do this.
    You can browse your schema in the task window on the left. Also when you select a field in a view it will highlight its name and location in the data source if you need to see which fields you are using.
    Best practice is to group your fields appropriatly and name them well or systematically. I know though when you are first starting out this is difficult. Unfortunatley reorganizing your data fields is not as quick and easy as it could be in IP. I would recomend auditing your form and making sure your data structure is legible and concise, I think it is worth the effort for a production form. In the future you will be better equipped to plan and create it correctly as you create the form. I know that controls can be drug into a view and they are given a default name but I always create the field and name it first before putting it into my view or utilizing it. This allows more forethought into the field and its purpose and keeps my naming and organization scheme under control.

    Maybe someone else has some other advice or best practices.
  • 03-19-2007 04:54 PM In reply to

    Re: Clearing out sourc code fields not used

    Hi Lou,

    Schema cleanup is always a pain, so you've just got to live and learn on that one. One other suggestion is to create a brand new form with a pristine schema and then port over all of your design and code. This takes a little bit of time, but it is WELL worth the savings in maintainability. Plus, you get the pride and joy of having an elegant and beautiful solution!
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.