I'm kind of newbie on this InfoPath stuff. I have a secondary data connection (Departments) on a form based on a SQL data source. I have a button that run a query on the database based on the employee_num. I have a table (Personal_Info) with all the employees data on it. The Department field on this table are integers. I have another table (Department) on which the name of the department is related to an integer.
What I want to do is to run a query based on the employee_num and have an expression box that display the department of that current employee using the relation between the 2 tables Personal_Info and Department. This is the Xpath that I use on the expression box
xdXDocument:GetDOM("Departments")/dfs:myFields/dfs:dataFields/d:Departments/@DepartmentName[../@DepartmentId = ../d:PersonalInfo/@Department[. = current()]]
The problem is that the expression box came out empty.
Can someone help me with this?
Do or Do not...there is no try.