One field in the form needs to be viewable only to 3 people listed on the form - InfoPath Dev
in

InfoPath Dev

One field in the form needs to be viewable only to 3 people listed on the form

Last post 05-18-2012 02:38 PM by Hilary Stoupa. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 03-22-2012 08:04 AM

    • trush
    • Not Ranked
    • Joined on 03-22-2012
    • Posts 22

    One field in the form needs to be viewable only to 3 people listed on the form

    I have a web enabled form where one field needs to be visible only to the originator, the authorization signoff, and HR.  I'm trying to figure out the best way to do this.  I figure I can do a rule where the field is hidden but can't figure out which/what to setup the rule.  Basically is user A, Mark, is the requester then he can see or edit the field.  If user B, Scott, just goes in to look at the form he should not see the field at all.  Any help getting started would be appreciated.

    thanks.   

  • 03-22-2012 10:25 AM In reply to

    Re: One field in the form needs to be viewable only to 3 people listed on the form

    If you already know the 3 people allows to view that particular field, there is the userName() function which will let you know who is the current user of the form.  Then all you need to do is to create a formatting rule that will check userName() against the allowed people.  If they don't equal, then hide the control.
    Anson Hidajat
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™

  • 03-22-2012 10:53 AM In reply to

    • trush
    • Not Ranked
    • Joined on 03-22-2012
    • Posts 22

    Re: One field in the form needs to be viewable only to 3 people listed on the form

    Unfortunately 2 of the 3 people change all the time depending on which department or department head has to access the form.  I'm trying to add a username field, then another field will concat the username with ending email to match to the requestors email.  Then I set the field to if those 2 fields aren't equal it doesn't show.  The problem is that the data i'm getting back from the QdabraAD field has caps in the email - ie. [email protected] and the one from the username concate is all lowercase [email protected].  Any ideas how to fix this issue cause they are not matching.

     

  • 03-22-2012 01:35 PM In reply to

    • trush
    • Not Ranked
    • Joined on 03-22-2012
    • Posts 22

    Re: One field in the form needs to be viewable only to 3 people listed on the form

    Ok - I went about this another way.  I set a username field and used GetMyInfo from AD.  Now I have 3 fields on the form that have names in them

    one is the person doing the requesting
    one is where the user puts in the name of the dept head that has to sign off on the form
    the third is for the HR member that has to see the form

    I want to hide the one field on the form from anyone else that may open the form.  I'm having a tough time with the conditional formatting to get it to show the field.  I have it set with 3 conditions

    if the username field does not equals any of the 3 fields listed above hide the control.  But it hides the control if I am the requestor, but not the dept head or hr person and when i put my name in the dept head it still hides it - i think because i am not the HR name.  Help on the conditional formatting for this ?  Or should I use rules ?

  • 05-11-2012 06:31 AM In reply to

    • trush
    • Not Ranked
    • Joined on 03-22-2012
    • Posts 22

    Re: One field in the form needs to be viewable only to 3 people listed on the form

    I am still having problems with this - can anyone help?

  • 05-11-2012 06:33 AM In reply to

    Re: One field in the form needs to be viewable only to 3 people listed on the form

    What do your rules look like? Can you attach a sample form (under the options tab) that shows what you are trying to do? Sometimes I have trouble understanding a written explanation, but get the point better with a sample form. :-)

    Hilary Stoupa

  • 05-14-2012 05:17 AM In reply to

    • trush
    • Not Ranked
    • Joined on 03-22-2012
    • Posts 22

    Re: One field in the form needs to be viewable only to 3 people listed on the form

    Hi Hilary,

    I've attached the form.  However, I don't have any rules assigned yet because I haven't been able to figure out the best way to do this.  What I want is - on the form there is a salary textbox.  I want if it is opened to show this box only if the following conditions apply:

    the person opening the form is the same as the person requesting (also a textbox)
    the person opening the form is the same as the VPName textbox
    the person opening matches one of the 3 names in the bottom of the form (under the HR section there are 3 textboxes with names in them)

    if the person opening is not one of the above I need to hide the salary field.

    thanks for the help!

  • 05-14-2012 10:07 AM In reply to

    Re: One field in the form needs to be viewable only to 3 people listed on the form

    I'm a little concerned about this - so you know, even if the user can't see the data in the form when they open it, all they have to do is open the XML with a text editor to see it. Is that an acceptable risk in your environment?

    Hilary Stoupa

  • 05-18-2012 04:52 AM In reply to

    • trush
    • Not Ranked
    • Joined on 03-22-2012
    • Posts 22

    Re: One field in the form needs to be viewable only to 3 people listed on the form

    Hilary - sorry took so long to get back on this.  It's not a problem.  The majority of my users wouldn't know how to open the xml and those that would have that knowledge don't have access to that document library.

  • 05-18-2012 02:38 PM In reply to

    Re: One field in the form needs to be viewable only to 3 people listed on the form

    I wasn't sure which fields in your form were which users? So I took sort of a swing at this - really, it is just a matter of having all your conditions in one clause - if I'm not the requester AND I'm not the dept. head AND I'm not the HR person, hide the control. This should at least give you the idea....

    Hilary Stoupa

Page 1 of 1 (10 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.