Custom Query? - Return specific records based on a field's value - InfoPath Dev
in

InfoPath Dev

Custom Query? - Return specific records based on a field's value

Last post 02-24-2011 04:32 AM by Max M. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 02-18-2011 05:05 AM

    • Max M
    • Not Ranked
    • Joined on 02-10-2011
    • Posts 9

    Custom Query? - Return specific records based on a field's value

    My company has a three-tiered management level (Section, Branch, Division) and I have a query that looks up all of the employee records for a section by selecting that section from a drop-down menu. I would like the Branch managers and the Division manager to be able to see only their direct subordinates when they select their branch or division from the drop-down...

     So far it works at the lowest level only, where a Section manager will see all of their employees except themselves, because I set a filter to only show records where a flag "IsSupervisor" is FALSE. I want the Branch managers to only see the Section managers underneath them (and change the filter of the "IsSupervisor" field), and I want the Division manager to only see the Branch managers.

    I'm open to changing the database, but I'd prefer to accomplish this with some kind of query that recognizes the orgID as a branch-level or division-level and then only returns a specific set of records based on the employeeID of those section/branch managers. I don't mind hard-coding the records that it should return because there are relatively few managers.

     Any thoughts?

  • 02-21-2011 12:37 AM In reply to

    Re: Custom Query? - Return specific records based on a field's value

    Well, easiest might be to use Active Directory and just get all of the directs for the current person. Installing Qdabra's Active Directory Web Service (free trial) and setting this up would take maybe 30-60 minutes. Not much time to do this. The benefit is that when management changes, it automatically works and shows the update.

    Another option would be to create a column in your DB table that has the supervisor's name and then you can query the database based on that but that also requires a Web Service because parameterized queries aren't supported in the default SQL query data adapters.

    I'm not quite sure how you have it working today. Are you using a SQL database form or is it an XML form with a SQL query? 

    Patrick Halstead
    Project Manager at Qdabra
  • 02-24-2011 04:32 AM In reply to

    • Max M
    • Not Ranked
    • Joined on 02-10-2011
    • Posts 9

    Re: Custom Query? - Return specific records based on a field's value

    I dont' have access to install things on the server. The form isn't really published anywhere on the internet or intranet, it is just a XSN file in a network location that is accessible by everyone who needs to use it, and they all have infopath on their machines.

    I'll try adding the supervisor's name to each employee's record, and then try to query based on that. Thanks.

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