infopath lock different controls or different view

Posted on 2008-11-10
Last Modified: 2012-05-05
I am just starting to make an infopath solution for a sharepont workflow.  I have a somewhat basic expense report.  I plan to only let certain people edit certain areas based on what step it is on.

I was thinknig that I would have to make different views of the info.  I clicked on Add a New View, and it gave me a blank screen.  Since everything is basically the same, the plan was to pretty much copy everything, then make certain controls read only.  I tried selecting everything then pasting and it did not work.

1. Is there an easy way to copy one view into another?

2. If I do this, will I have to rename controls, so the firstname in one view would have to be something else in the other view?  Can they all be the same?  Are views seperate?

3. Is there a better way of doing this?  Should I just lock controls one at a time, instead of swithing views?

4. Is there a way to make a view out of a partial piece of the form?  Meaning, if I only wanted to restrict one area, can I kind of leave the whole form and only restrict/enable a certain section? (Like an area of a paper form the says "For office  use only"

Question by:jackjohnson44

    Author Comment

    I tried copy and paste, but that won't work. My new view has a dark grey background.
    LVL 28

    Accepted Solution

    You should be able to copy and paste most controls and text.  Sometimes it is difficult to highlight all of what you need with repeating tables or scrolling regions. Also button rules do not copy.  The fields and controls are referenced the same whether they are in multiple views.  The data is the same it is just the view that is different.

    Creating seperate views is a good practice, especially if the view will be all readonly since in 07 you can make an entire view readonly in view properties.

    You can use one view and make individual controls readonly using conditional formatting, in some cases this can work but with lots of controls can get cumbersome.

    Another way to make a text control readonly is change it to an expression box.

    There are multiple ways and combinations and it will come down to your specific requirements.

    Author Comment

    Thanks, if I can get the copy and paste working, is can the controls all have the same name as on the first view?  Will I have to rebind them and treat them as totally different controls?

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Suggested Solutions

    For SharePoint sites, particularly public-facing ones, there are times when adding JavaScript, Meta Tags, CSS Styles or other content to the page <head> section is more practical than modifying master pages.  For instance, you could add the jQuery l…
    A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now