Data Filtering is not working as expected

0
Hello Team,   There is one business requirement. Could you please review it and provide your valuable suggestions on how we can successfully fulfill the following requirements?       We created 3 different home pages for Boardman (Home_BM), Supervisor (Home_Supervisor) and Manager(Home_SM). Added these under role-based home page section in navigation.       We can see the entity IOSLogBook filter details in below screenshot. This filter helped to show the user data of which they belongs to.   Board man creates a form, he can keep the form in 2 ways. i.e,   -Draft =  Need to modify after some time (Will not show to supervisor).   -Submitted = for Supervisor Approval.   Supervisor will approve or reject the form that was submitted by Boardman.   Until supervisor approves the form other members of the same role (Boardmans) shouldn’t see the row in Home_BM page except the board man who created the form. Please let me know what filter to apply on Home_BM data grid to achieve this functionality.   Thank & Regards, Akshay
asked
4 answers
0

Is there an association to the user account of the BM that created the record? Then you can extend the XPath for entity to include the Path to User. Or if you don't have/want an association, you can use the Owner constraint. 

image.png

For this you will have to story the owner (user who created the object) as a System Member.

image.png

 

Depending on the case, you could try to combine it in one constraint or use two separate ones.

1) The PN1 Boardmen can see all approved for PN1

2) The PN1 Boardmen can see draft created (owner/ path to user) by themselves.

 

Screenshots examples:

Use Case:

Users can create Groups with Draft status and update their own records when still in Draft. They cannot see other draft Groups. They can see all Approved Groups.

Approvers can change the status for Draft records to approved

Note: this is just an example to show the options, not a real life situation.

 

Entity Group with a status. Owner System Member stores the user who created the record.

image.png

Status has a default that cannot be changed by the User.

Rule 1 for user: Allow to create records and modify your own draft (except for status) 

image.png

Rule 1 for Approver: Allow to change the status of Draft records

image.png

 

Both User and Approver have read access to Approved records.

image.png

 

Like I said, this is just and example. eg. you will need to make sure you cannot change the status to empty eg. by a validation microflow on save.

answered
0

Hi Micha 

 

I wanted to clarify our intention regarding the visibility of records in Home_BM page. If PN1Boardman1 creates a new request, it should not be visible to PN1Boardman2 until the record is approved by the Supervisor. Once the Supervisor approves it, only then should it become visible to the all the user of PN1Boardman userrole.

 

When Boardman submits the record, it will be having status as "Submitted", when supervisor approves the request then it become approved. After this only record should be visible other users of PN1Boardman userrole.

answered
0

I am new to Mendix. Could you please help me how to create two rules with some screenshots?

answered
0

Hi Akshay,

 

You can create a page containing a tab container and use XPATH constraints to make the first tab for the user who created the request and give it visibility and the other tab contains approved status for the request and makes it visible for all users.

 

I think it'll be a fit for your business role if I understand it in the right way.

answered