HI Mark,
You can keep 2 separate pages for 1 for Manager and 1 for User.
For you first two points :
Add a DataGrid with Datasource as microflow and you write your logic there. I have created once logic for you for Domain Model Similar to yours.
Here is my Domain Model :
I have enabled System.owner for Request Over view.
Expressions for your Reference in List operation (Filter With Expression) :
To retrieve all Supply Request :
$currentObject/ForumQuestions.Request_Supply!=empty
To retrieve Service Request created by Logged in user:
$currentObject/System.owner=[%CurrentUser%]
and
$currentObject/ForumQuestions.Request_ServiceRequest!=empty
The Only Fall back with this approach is you will loose default Data grid Search Functionalities.
I have a suggestion , you can add an Enumeration attributes which hold the type of Requests like, Gift, ServiceRequest, SupplyRequest, FoodBevrage in your Request_Overview entity. You can add a drop down to select the type of request.
Then you can add a Datgrid with a Xpath Constraint , with this approach Default Datagrid functionalities will be enabled.
[RequestType='Supply' or System.owner='[%CurrentUser%]']
You can choose either of option to achieve your Functionality.
And for Manager you can create Similar flow.
Hope this Helps . All the Best!!
Hi Eline, this our domain model
Hi Mark,
Just a short remark: you may want to consider using a TemplateGrid or List view instead of a datagrid. This allows for easy retrieval of each description using data views and visibility.
I hope this helps.
Michiel
for visible to current user:$currentObject/System.owner=[%CurrentUser%]
in xpath
for visible to your manager just create a seperate grid which is visible to managers just make it blank