AD Web Service - InfoPath Dev
in

InfoPath Dev

AD Web Service

Last post 08-20-2008 03:10 PM by ErnestoM. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 01-29-2007 12:43 PM

    AD Web Service

    O.K. got the program AD Web Service installed. I have read the blogs, can't fine one close to my needs and still can't get the service to work the way I need.

    Keep in mind I am still at Infopath 2003.

    I have a Drop Down List Box in a form that has names listed in it manually (name format = John Smith). I want to be able to look at the person name that is selected in that Drop Down List Box when the form is opened, compare that name to the person that AD Web Service returns and only allow access to that section of the form if the names match as it would be in conditional formatting "Example" user role - not equal to - John Smith.
    I keep reading about alias, is that the fix??
    I have tested the AD Web service and can get user information.
    Help Please

    Thanks

  • 01-30-2007 11:34 AM In reply to

    Hi John,
    You should be using alias since names can be duplicate, but let's try it with name first and then you can change the dropdown to have name as the display and alias as the value. Here are some steps:

    Add a data connection for GetMyInfo - seehttp://www.infopathdev.com/forums/topic.asp?TOPIC_ID=848 for instructions. Replace "sAMAccountName" with "cn" so you can get the real name (cf. alias). Note: make sure that you leave the checkbox in the last dialog checked to call this on load). You don't have to set a value in your form, but for now, this simplifies things, so please add a value and set that node.

    Add an On Load rule
    1. In Designer, go to Tools->Form Options
    2. Select Advanced
    3. Select Open Rules
    4. Create a Rule, called Check User
    5. For condition, checks to see if the value in the field you added above against one of the names in the dropdown.
    7. Add an action to switch to the read-write view
    (assumes your default view is read only)

    You can take the dropdown and add a secondary XML file and compare against the whole list on load using the User Roles dialog.

    Sorry if this isn't clear, but I have to run. More later.
    Patrick Halstead
    Project Manager at Qdabra
  • 07-24-2008 08:33 AM In reply to

    Hi Patrick,

    That is a great post and quite useful.  Unfortunately, I'm having trouble with the form not populating the information.  I added a rule to an "Author" field to fill in the value with key="cn" but nothing happens.  I added a button to fill in the fields value and nothing happens.  I then added a rule when opening the form (like your previous post) but nothing gets entered.  The data connection is set up as a secondary source pointing to the AD web service.  Not sure what else to try.

    Thanks!

    Phil.

  • 08-20-2008 03:10 PM In reply to

    I've written a document on how to query the AD Web Service - don't know if it'll be helpful.

    One thing to try is to (as a debugging measure) show the entire result of the AD Query in your form. This would include all Keys and their corresponding values. You can then find the Value you want (Firstname Lastname) and find the key you'll need to filter on.

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – 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.