Is it possible to customize the Contact Selector control? - InfoPath Dev
in

InfoPath Dev

Is it possible to customize the Contact Selector control?

Last post 02-25-2009 09:59 PM by Votsar. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 04-22-2008 03:10 AM

    • Bleak
    • Top 500 Contributor
      Male
    • Joined on 04-16-2008
    • Germany
    • Posts 28

    Is it possible to customize the Contact Selector control?

    Hi all, my first post here...

    I need my Contact Selector to restrict the user selection to members of a specific AD group (that is, so that it would return only admins, for example). The elegant solution would be to modify the control's LDAP query accordingly, but I have no idea how to do this. If this is indeed possible, I'd like to know how.

    A somewhat more crude solution is to make a separate LDAP query during a validation event and see if the selected user is a member of the desired group. Being somewhat newbish to Infopath, I have trouble figuring out the correct way to read the selector's text field.

     So, what I'm trying to do is the following:

    1. Let the user select the contact and the control do its job.

    2. Get the the resulting displayName from the control (stuck here)

    3. Use the name in a new query to see if this user is an admin (no problem, as soon as 2 is done)

    4. Clear the field in case he's not (and inform the user of his folly).

     
    PS: Oh, and the form is browser-enabled, if this helps any.

  • 04-23-2008 09:53 AM In reply to

    Re: Is it possible to customize the Contact Selector control?

    Qdabra.com has an AD Web Service that can be of help here.

  • 04-23-2008 12:11 PM In reply to

    • Bleak
    • Top 500 Contributor
      Male
    • Joined on 04-16-2008
    • Germany
    • Posts 28

    Re: Is it possible to customize the Contact Selector control?

     Unfortunately, I am restricted by my employer to utilize only the tools provided by them.

    One more question, when the selector presents the list of users to choose from, it is possible to click "Cancel" and leave the field half-filled. Is it possible to disable this feature, or somehow ensure that a user was "selected" in the text field?

  • 04-24-2008 04:16 PM In reply to

    Re: Is it possible to customize the Contact Selector control?

    Without some sort of Active Directory Web Service, you are stuck setting your form to Full Trust to get all the information you want. That's not a pleasant scenario for Browser form deployment--but is doable.

    I'm not sure what this "Cancel" is or what its functionality is... unless you are referring to something that the browser app is doing when it is pulling down data from a connection. If that's the case, then there's no way to disable it. You would have to do some code or something to identify whether the form is in a broken state and then have them fix it. Probably on submit is best.

  • 04-25-2008 01:48 AM In reply to

    • Bleak
    • Top 500 Contributor
      Male
    • Joined on 04-16-2008
    • Germany
    • Posts 28

    Re: Is it possible to customize the Contact Selector control?

    When you enter something into the control and navigate away from it, it displays a dialog box where you can choose a user or group based on what you entered in the field. If you press "Cancel" at this point, the field is left unchecked (no OnChange or Validation events launching), yet not blank, effectively bypassing all validation checks. Although the user must try hard to mess this one up, this is somewhat dangerous, since values from that control are passed to email adresses later in the workflow. I guess I cann add an invisible checkbox to be checked if a validation event was run for the selector, but this is kinda awkward.

    Another thing: The OnChange event for the selector returns blank values. It seems that the fields are actually populated AFTER this event finishes. As this works perfectly for all the other controls I've tried, this apperas to be a bug. Is there a workaround for this? Basically, I'm trying to populate some textfields with additional user information pulled from the AD (via a custom LDAP query) using the AccountId property of the selector to find the needed user in the AD.

  • 04-28-2008 02:43 PM In reply to

    Re: Is it possible to customize the Contact Selector control?

    The contact selector must be a custom control--it's not a standard InfoPath control and I'm not familiar with it.

    You might needt contact the creator of the control to find out how to do what you are wanting to do.

  • 04-29-2008 01:13 AM In reply to

    • Bleak
    • Top 500 Contributor
      Male
    • Joined on 04-16-2008
    • Germany
    • Posts 28

    Re: Is it possible to customize the Contact Selector control?

    Contacting the control's authors, or at least someone who knows their way around it was the whole point of this thread, seeing as how MS Infopath 2007 ships with it, and the InfoPath Senior Development Lead, one Scott Roberts, provides some in-depth info on its usage. Unfortunately, its entry in the MSDN doesn't provide the level of detail I seek. My searches showed that people having trouble with this control contact the Infopath developer team to resolve their issues. So, could you perhaps direct me to a member of the Infopath developer team? I came to this forum in hopes of finding them here, but had no luck so far.

  • 04-29-2008 01:16 PM In reply to

    Re: Is it possible to customize the Contact Selector control?

    I see. I was unaware of this control.

    I am not sure how many of the IP team hang out in these forums, but I do know that there are a few that frequent the Microsoft Public Newsgroups for InfoPath. You can get to them using Outlook Express (XP) or Windows Mail (Vista) by connecting to newsgroup server: msnews.microsoft.com

    Sorry I can't help you any more than that.

  • 02-25-2009 09:59 PM In reply to

    • Votsar
    • Not Ranked
    • Joined on 02-08-2009
    • Posts 4

    Re: Is it possible to customize the Contact Selector control?

    Hi Bleak,

    Did you ever manage to resolve this issue?

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