Infopath 2010 Make control read only if it contains data

Posted on 2011-04-27
Last Modified: 2012-05-11

I am running SharePoint 2010. I have a list with several Lookup columns. One of the Lookup columns if called 'Air Card'. I would like to create a InfoPath that disables the control for 'Air Card' if it contains data. If it is empty then I want the control to be enabled.

And this is where my problem starts. I created a rule as the one displayed in the screenshot below hoping that the field would be disabled if it contains data. if it does not then it would be enabled. This is the function I try to accomplish but now everytime try to add or edit the list item the control is disabled. I tried several other for the confition like 'matches pattern' etc but none of them keep to be working.
If the trick is that the field is a Lookup field ?

Please help.
Thank you
Mc2102 Scrrenshot of Infopath rule
Question by:Mc2102
    LVL 3

    Expert Comment

    Are you using the InfoPath client to make the form?
    If you're building the form in SharePoint, try using InfoPath.

    In InfoPath there is a rule to hide or disable fields when a predefined condition is true. If the field will not be disabled, the rule isn't correct...

    You can also put the field in a section. Show the section only if the field is empty...

    Author Comment

    Yes I am trying to use Infopath and the the type of rule you are talking about but the column is now permanently disabled. I believe that has something to do with the fact that the field is a Lookup column and even if the column looks empty it is not.

    This sections you are that within Infopath or SharePoint designer?
    LVL 3

    Accepted Solution

    The sections are InfoPath sections. There you have Optional sections, choice sections and just sections...

    But I think you will get the same problem, because when the field is never empty, the rule won't work...
    But you can give it a try...

    With Xpath you can do a lot of data manipulation...Like filling the field with a default value when it's empty or having a value that it looks empty. Be creative and find a good solution...

    Author Closing Comment


    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    Summary In SharePoint 2010 it is easy to create custom color themes to jazz up a site. Theme colors can also be created in PowerPoint 2010 with a few clicks. But how do the chosen colors actually look in the SharePoint site? The attached PowerPoint…
    Before you can digitally sign infopath forms, you must have a digital certificate. Microsoft Certificate Services will need to be enabled on a Windows Server 2008 to facilitate the creation and verification of the digital certifciates on the web ser…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
    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…

    728 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

    15 Experts available now in Live!

    Get 1:1 Help Now