Here is my scenario: I have created a Timesheet form in Infopath 2010 that has a receive data connection to a SQL database, which I set up through DBXL. The SQL table my form is connected to contains a hierarchy for my company. In the form, I have a dropdown box that lists all of the Employee ID Numbers in the SQL table and when a user selects their ID Number, their supervisor's name is automatically assigned to a hidden "Supervisor" field in the form. All of this works perfectly thanks to DBXL.
My plan was to use the "Supervisor" field to query Active Directory in order to receive that supervisor's email address, so that an email would be sent to the appropriate supervisor when a user submits a Timesheet form. I was trying to use the FindUsersByName operation to accomplish this, but this will not return a result when I use the supervisor's name I received from SQL to query Active Directory. I'm assuming this is because the name is in a SQL data type instead of plain text, as the FindUsersByName query does work if I type a name into the search instead of using the "Supervisor" field. Does anyone know of a way to make this work?
Thanks in advance for any assistance.