Hi everyone,
I need to build a team dashboard for managers and directors, where the team data is stored in a single record type. This data includes fields like username, personal number, manager's personal number, and email ID. I’m currently passing the email ID to fetch the personal number of a user, and then using that personal number to find the manager's personal number in order to get a list of employees under that manager. This process is repeated for up to five levels, as directors report to managers and each manager can have multiple employees under them.
However, after implementing this approach, the performance of the UI has slowed down significantly. Can anyone suggest a more efficient alternative to improve the performance while maintaining the same functionality? Below is the code for your reference.
Discussion posts and replies are publicly visible
Hm, what data do you want to display on that dashboard?
Sorry Stefan Helzle Verified the above answer by mistake.I want to get all the user names which are under the director. SO lets say A is the director and B and C are reporting to A. I want to get B and C in output and also the names of the people reporting to B and C and this loop has to go for 5 levels.
That might become a very long dashboard ...
Do you have a specific reason for making queries in a loop? I mean, the "in" operator should be able to return the same output.
community.appian.com/.../antipatterns-solution-design-mistakes-to-avoid-in-appian