locked
Newbie Questions - InfoPath RRS feed

  • Question

  • I am new to SharePoint and InfoPath; have 2 questions:

    1.  How do I add a hidden label on my InfoPath form and set its value to the user id of currently logged user?

    2.  Hide or display a section of the InfoPath form based on the value of the hidden label?

    Thanks in advance!

    Thursday, August 23, 2012 1:09 PM

Answers

  • I suggest you take time and explore the software and its options before designing a form :)

    See the preview mode here

    if you dont find the toolbar enable it.


    -Kranthi

    • Marked as answer by Shayaan Thursday, August 23, 2012 6:16 PM
    Thursday, August 23, 2012 4:39 PM

All replies

  • Hi,

    1. add a field of type text name it "user" and drag on to the form

    2. right click on the textbox and select textboxproperties

    3. select "fx" button beside the default value  textbox

    4. select insert function and insert username()

    5. Click OK

    the above steps will capture username

    1. select the user text box and select "manage rules" in the ribbon

    2. in "rules" select "New" and then formatiing.

    Set condition as

    "User" = "the username for which you want to hid the control"

    check hide this control in formatting section

    Click ok

    Click preview and check.


    -Kranthi


    Thursday, August 23, 2012 1:38 PM
  • Thanks for the detailed solution; let me try it and get back to you.
    Thursday, August 23, 2012 1:59 PM
  • I am using 2007 and having trouble folowing some of your instructions.. where do I fond the following?

    2. in "rules" select "New" and then formatiing.

    Thursday, August 23, 2012 4:04 PM
  • select the control that you want to add conditional formatting to, and then click Conditional Formatting on the Format menu.

    http://office.microsoft.com/en-in/infopath-help/apply-conditional-formatting-to-a-form-template-HA010024057.aspx

    For adding a control

    http://office.microsoft.com/en-us/infopath-help/add-move-or-delete-a-field-or-group-HA001232994.aspx#BM2


    -Kranthi


    Thursday, August 23, 2012 4:16 PM
  • Where is

    Click preview and check.

    Thursday, August 23, 2012 4:24 PM
  • I suggest you take time and explore the software and its options before designing a form :)

    See the preview mode here

    if you dont find the toolbar enable it.


    -Kranthi

    • Marked as answer by Shayaan Thursday, August 23, 2012 6:16 PM
    Thursday, August 23, 2012 4:39 PM
  • I was using Visual Studio 2008 and couldn't find it; will reopen the project in InfoPath.
    Thursday, August 23, 2012 4:49 PM
  • I modified my project in InfoPath and it seems to be working as expected.

    You are such a great helper; much appreciated.  Thank you!

    Thursday, August 23, 2012 6:16 PM