Auto populate from AD, filter not working - InfoPath Dev
in

InfoPath Dev

Having trouble finding a blog or post that answers your question? Check out our Custom Search Page

Auto populate from AD, filter not working

Last post 07-11-2012 09:09 AM by Kazzahere. 14 replies.
Page 1 of 1 (15 items)
Sort Posts: Previous Next
  • 06-28-2012 04:48 AM

    Auto populate from AD, filter not working

    Hi

    I am trying to pull information through from AD to populate a form of staff details when the staff id number is entered.

    I have created a data connection and linked to this in a fields default value. The link appears to be working as it's pulling a name through until I add a filter. I have looked at other posts on here and thought what I was adding was correct but the field stays blank. I end up with this @Forename[@Initials = IDNumber], where Forename is what I want in the field, it looks to my secondary data connection (AD) at the initials field and should equal the IDNumber field on the main data connection (the form).

    I have no idea what I am doing wrong and would appreciate any help.

    I have no knowledge regarding code so hoping there is a simple solution.

    Thanks

    Karen

    Filed under: , ,
  • 06-29-2012 12:35 PM In reply to

    Re: Auto populate from AD, filter not working

    Hi - If you haven't already done this, perhaps drag the data fields from your secondary data connection onto your form - so you can see them all. Make sure any of the fields you are using in your filter are visible. And remember that XPath is case sensitive - usually when I have problems like this (with filters) it turns out things don't have the values I think they do... :-)

    Hilary Stoupa
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™

  • 07-02-2012 02:34 AM In reply to

    Re: Auto populate from AD, filter not working

    Hi Hilary

    Thanks for your response.

    I dragged the fields onto the form and previewed it and they all seem to be populating as expected. I have a test account that I am using and the details are showing for that.

    It only seems to be a problem when I add the filter as it pulls through otherwise.

    Any suggestions on what else I can try.

    Thank you

    Karen

  • 07-02-2012 08:59 AM In reply to

    Re: Auto populate from AD, filter not working

    What does the full XPath for the formula look like? In the formula editor there is a checkbox for showing the full XPath - can you paste that in a reply?

    Hilary Stoupa
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™

  • 07-02-2012 09:07 AM In reply to

    Re: Auto populate from AD, filter not working

    I am hoping this is what you need, totally alien to me.

    xdXDocument:GetDOM("Link to AD")/dfs:myFields/dfs:dataFields/d:k_qlp_AD/@Forename[../@Initials = xdXDocument:get-DOM()/my:myFields/my:ID_Number]

  • 07-02-2012 09:24 AM In reply to

    Re: Auto populate from AD, filter not working

    And you've confirmed that there is a value in your "Link to AD" data connection in the @Initials field that exactly matches the current value in the ID_Number field? Can you attach a screen shot in under the Options tab that shows that? Put the Link to AD data fields on your form, as well as a text box bound to the ID_Number field...

    Hilary Stoupa
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™

  • 07-03-2012 05:22 AM In reply to

    Re: Auto populate from AD, filter not working

    I'm not too sure what 'text box bound to the ID_Number field' meant sorry but I have added a screen shot of a couple of fields from the Link to AD data connection and the form I want the data to populate.

    Really appreciate your help, thanks.


  • 07-03-2012 11:42 AM In reply to

    Re: Auto populate from AD, filter not working

    The controls on your form are bound to fields in your data source. If your "Staff ID Number" text box had been a dropdown instead, I wouldn't be able to tell from the screenshot if the values were the same. They sure look the same, don't they?

    You could add an expression box (calcuated value) in the repeating section with the formula @Initials = ID_Number - that is, just a formula checking to see if each Initials field is equal to the ID_Number field in your main data source - We'd expect the expression box to evaluate to true on the second row there. Attach your template if you'd like me to set that up for you.

    Hilary Stoupa
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™

  • 07-04-2012 01:30 AM In reply to

    I see. I didn't make the Staff ID Number a drop down as there are approximately 1500 staff so I thought that might be a bit excessive.

    Is an expression box a control? Sorry, I thought I was getting the hang of this but seems I don't even know the basics.

    I have attached the form as mentioned as I'm not sure what I am doing but happy to give it a try if you can provide me with steps. Whatever way is easier for you.

    Thanks

  • 07-10-2012 07:47 AM In reply to

    Re: Auto populate from AD, filter not working

    Hi Hilary

    Sorry to ask again but wondered if you had reached a conclusion as to what I am doing wrong re this form. I only have a couple more days in this role and would love to complete this project before I go.

    Thanks very much

  • 07-10-2012 11:34 AM In reply to

    Re: Auto populate from AD, filter not working

    Sorry - hadn't seen your post - I'll take a look today.

    Hilary Stoupa
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™

  • 07-10-2012 11:43 AM In reply to

    Re: Auto populate from AD, filter not working

    Here's a copy with an expression box indicating whether the initials match the ID_Number - preview it and enter an ID_Number and see if any of the expression boxes display "true".

    Hilary Stoupa
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™

  • 07-11-2012 02:07 AM In reply to

    Re: Auto populate from AD, filter not working

    Am thinking this is not good as they all display false. It has automatically pulled all the details through so Initials, Surname and Forename are there but the validation field states False. Not what I was hoping for but I think that's what you expected.

    Does this help establish the problem?

    Thanks

  • 07-11-2012 08:14 AM In reply to

    Re: Auto populate from AD, filter not working

    Well, the problem is the value in the Initials field is not actually equal to the value in the ID Number field. Are there any spaces after the value in the Initials field?

    Hilary Stoupa
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™

  • 07-11-2012 09:09 AM In reply to

    Re: Auto populate from AD, filter not working

    That was it!! You are a genius.

    MIS revisited the data and cleaned it up as there was a number of blank spaces after the 4 digit entry code.

    I really appreciate your help and the time you have given this problem.

    Thank you

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