New to AppSheet and building out a Directory with employees and clients. Running into an issue when matching employees to clients based on specific criteria which includes data from a Enumlist.
I need to match the client to an employee based on input values from [State], [Service], [Type]. What I’m trying to do is once those fields have been filled out, it will populate an enum of employees that match all input values.
Below is a sample of tables I am using. For the Employee Table, [Team] represents the Client Table[Service] they cover, [Service Area] represents the Client Table[State] they cover, [Location] represents employee’s residing state. If a Client Table [Type] is “Onsite”, then only an employee who resides in that state can be matched. However if Client Table [Type] is “Virtual”, [Location] does not apply and any employee who has the Client Table[State] under their [Service Area] can be matched.
So an example: I’ve filled out the form for ABC Store is in “Georgia”, Service is “HR”, and they need someone “Onsite”. The employees that would be available to match and include in the list to select from would be Andrew, Ann, Charles. (Barbara or Chelsea are not included because their [Location] is outside of Georgia.
Second example: XYZ Store is in “Texas”, Service is “IT” and Type is “Virtual”. Employees that match and populated into the list to choose from are Aaron, Alan, and Brian. (Alan and Brian are included because their [Location] does not apply since Client Table[Type] is "Virtual’.
Any Suggestions or Help would be greatly appreciated!
Employee Table
ID |
Employee |
Team |
Service Area |
Location |
|---|---|---|---|---|
EM0001 |
Aaron |
IT |
Missouri , Texas , Georgia |
Texas |
EM0002 |
Alan |
IT |
California , Minnesota , New York , Texas, Wisconsin |
Wisconsin |
EM0003 |
Amanda |
Sales |
Texas, Georgia |
Texas |
EM0004 |
Andrea |
Sales |
Maine , New York , Pennsylvania , Texas |
Pennsylvania |
EM0005 |
Andrew |
HR |
Georgia , South Carolina |
Georgia |
EM0006 |
Ann |
HR |
Georgia, Alabama, Tennessee |
Georgia |
EM0007 |
Barbara |
HR |
Colorado , Georgia , Idaho , Illinois , Indiana , Kentucky , Maryland , Michigan , Montana , Nebraska , New Hampshire , Oklahoma |
Colorado |
EM0008 |
Brian |
IT |
Idaho , Illinois, Texas |
Idaho |
EM0009 |
Charles |
HR |
Alabama, Florida, Georgia, Indiana , Michigan , Montana , Nebraska |
Georgia |
EM0010 |
Chelsea |
HR |
California , Georgia, Texas, New York |
California |
Client Table
ID |
Client |
Employee |
Service |
Type |
State |
|---|---|---|---|---|---|
CL00001 |
ABC Store |
HR |
Onsite |
Georgia |
|
| CL00002 | XYZ Store | IT | Virtual | Texas | |