Hi Experts,
Im quite new for Outsystems. Currently got a table, which listed all the submitted form with different status (referring to the table below):
The roles have been create for the different users:
e.g., The role of User A/B/C/D = End User;
The role of User X = Manager;
The role of User Y = Division Head;
The role of User Z = CEO.
How could achieve that
1)when End User role login the system, they only can view their own submitted form (like User A only can view the record which submitted by A)?
2)The other role user can only view the record which need their processing?(like user Z as the CEO, he only can view the record with Pending on CEO Processing status?
Thank you!
Hi @Giselle Chen ,
Firstly if you can create column which hold the different status value would be more easy. You must have 4 different roles created. In your aggregate you can filter like this below example and add condition so on for other roles.
Hello
You need to create all the Roles required in your requirement and you need to control the user basis on their roles, So I prefer you can go through these tutorials to have a knowledge and also how you can use them.
ThanksTousif Khan
Firts of all, If above table is the design of your actual form entity then i would recommend to have status as a separate static entity and refer the StatusID as column inside form table.
This way it will be easy to filter on status column.
Now coming back to your requirement, It is all about how you apply filter condition to your aggregate.
The above use cases can be achieved by following logic.
1) You can filter the aggregate by logged in user id = Submitted by. This should give you only those records which is submitted by logged in user.
2) here you need to filter the status based on user´s role. If logged in user is CEO then filter it with specific CEO status and so on.
To make it more easy, You can also have another entity where status vs user role mapping can be organised Like CEO role can have access to CEO related statuses only.
Tried to giving you a direction here other then direct solution, this will surely help you to learn.
Thanks,
Vani