Hi all,
So, I have developed a small employees management app. I have manually populated the employee entity (which has as attributes an ID, a Name, a LocationID and a ManagerID - for locations I have a different entity called 'Location' with an ID and a Name) as you can see in the capture below.
But when I run the application in browser, the employees list is displayed in a different way comparing with the way I implemented in Outsystems Service Studio. As you can see, it's a problem with the 'Manager' column as each employee has his own name allocated as a manager.
Also, when I'm trying to add a new employee in this list, by clicking the 'Add Employee +' button, I'm redirected to an employees details page, where I can't allocate a manager for the new employee. As you can see in the capture below, the 'Manager' drop-down' is empty.
Do you have any idea what could cause this issue?
Thank you!
As you can see both have same assignment you need to get name by ManagerID (
GetEmployeesByName.List.Current.Employee.ManagerID)
As your both data in same table you need to use self join to get the manager name
For dropdown you should use At start
Set this property as Start.
Only on demand will work when you force refresh this aggregate.
Yes, thanks a lot @Rahul Sahu !
Can you please share oml file. It must be wrong assignment.
Sure!
Awesome, thanks for your help @Navneet Garg. Just one more question. As it's my first OutSytems app, I'm not so familiar with the use of self join. What should I do for displaying the manager name, too?
Please check the oml I shared with you.
Can you provide the more detail on Screen of Add Employee page.
What aggregate you are using for Manager Drop down.Just check it should be separate Aggregate for Manager Dropdown on screen which bind with Employee ID and Name.
Please check the oml
https://personal-u1aragiz.outsystemscloud.com/EmployeesManagementApp/Employees
Hi @Valentin Tamas ,
I assume that you are getting the employees list from aggregate with sources employee table joined with another employee table where the join is based on first employee table's manager ID = Second Employee Table's ID. then check whether you are using second employee table's name column for manager column in the screen.
On the details page, check whether you are passing a list for the manager dropdown from the aggregate with source as employee table and should have a filter implying manager id = NULLIDENTIFIER() to get the managers.
It would be great if you share your OML to check.
Thanks,
Sriyamini J