Hi, everyone! I have made an app that should assign employees' requests to different members of the company depending on the manager. I've got 2 lists: 1)It is called "Retornoflexible_1", it contains all the requests and one of the columns is "Legajo" which is the requester's ID, text type. 2)It is called "TablaEmpleados", it contains all the employees' ids (USERID), their email (EMAIL) and manager's id (MANAGER). I would like to filter a gallery with all the requests depending on who is logged in. I would need to look up the requester's id on Retornoflexible_1, obtain the manager´s id, then look up the manager´s id and get it's email. After that, I may filter the gallery. I used this code in the items property of the gallery but it keeps failing.
Filter(RetornoFlexible_1;LookUp(TablaEmpleados;LookUp(TablaEmpleados;Legajo=USERID;'MANAGER')=USERID;'EMAIL')=User().Email)
I think that I have the problem with "Legajo" reference but I'm not sure what I am doing wrong.
Thank you in advanced!!!
Solved! Go to Solution.
Hi @denise_martinca ,
Could you please share a bit more about your scenario?
Do you want to list all available requests which are assigned to current sign in user inside your Gallery?
Further, does the "Legajo" column in "Retornoflexible_1"List match the USERID column in your "TablaEmpleados" List?
Based on the formula that you mentioned, I think there is something wrong with it. I have made a test on my side, please consider take a try with the following workaround:
Set the Items property of the Gallery to following:
Filter(
RetornoFlexible_1;
LookUp(
TablaEmpleados;
USERID = LookUp(TablaEmpleados; USERID = Legajo).MANAGER
).EMAIL = User().Email
)
Note: I assume that each "Legajo" column from "Retornoflexible_1"List could only match single one record in your "TablaEmpleados" List. The USERID column is a unique type column (without duplicates) in your "TablaEmpleados" List. And the USERID column and the MANAGER column store similar value.
Of course, I think the Addcolumns function could also achieve your needs. Please consider try the following workaround:
Filter(
AddColumns(
AddColumns(
RetornoFlexible_1;
"ManagerID"; LookUp(TablaEmpleados; USERID = Legajo; MANAGER)
);
"ManagerEmail"; LookUp(TablaEmpleados; USERID = ManagerID; EMAIL)
);
ManagerEmail = User().Email
)
Please consider take a try with above solution, then check if the issue is solved.
Best regards,
Hi @denise_martinca ,
Could you please share a bit more about your scenario?
Do you want to list all available requests which are assigned to current sign in user inside your Gallery?
Further, does the "Legajo" column in "Retornoflexible_1"List match the USERID column in your "TablaEmpleados" List?
Based on the formula that you mentioned, I think there is something wrong with it. I have made a test on my side, please consider take a try with the following workaround:
Set the Items property of the Gallery to following:
Filter(
RetornoFlexible_1;
LookUp(
TablaEmpleados;
USERID = LookUp(TablaEmpleados; USERID = Legajo).MANAGER
).EMAIL = User().Email
)
Note: I assume that each "Legajo" column from "Retornoflexible_1"List could only match single one record in your "TablaEmpleados" List. The USERID column is a unique type column (without duplicates) in your "TablaEmpleados" List. And the USERID column and the MANAGER column store similar value.
Of course, I think the Addcolumns function could also achieve your needs. Please consider try the following workaround:
Filter(
AddColumns(
AddColumns(
RetornoFlexible_1;
"ManagerID"; LookUp(TablaEmpleados; USERID = Legajo; MANAGER)
);
"ManagerEmail"; LookUp(TablaEmpleados; USERID = ManagerID; EMAIL)
);
ManagerEmail = User().Email
)
Please consider take a try with above solution, then check if the issue is solved.
Best regards,
Thank you very much!! I used this code and it worked perfectly!!!!!!!
Filter(
AddColumns(
AddColumns(
RetornoFlexible_1;
"ManagerID"; LookUp(TablaEmpleados; USERID = Legajo; MANAGER)
);
"ManagerEmail"; LookUp(TablaEmpleados; USERID = ManagerID; EMAIL)
);
ManagerEmail = User().Email
)
User | Count |
---|---|
160 | |
93 | |
81 | |
74 | |
58 |
User | Count |
---|---|
196 | |
166 | |
99 | |
95 | |
79 |