Hello Moqui Community,
I want to extend my gratitude to those who offered assistance with filtering records in Moqui. With your help, I’ve successfully implemented the filtering logic based on the “SIGN_ENABLE” field.
Now, I’m looking for guidance on how to use these filtered records in the Moqui Framework. Specifically, I need to know how to access and work with the filtered data in my application.
If anyone can provide examples, code snippets, or general advice on how to work with the filtered records, it would be greatly appreciated.
<moqui.security.EntityFilterSet entityFilterSetId="AgreementInfoFilter" description="Filter AgreementInfo Records">
<filters entityFilterId="AgreementInfoFilter" entityName="com.esign.AgreementInfo" filterMap="[signEnable:true]"/>
Hi, You can check ArtificatGroupDetail for use of EntityFilterSet
One thing to be careful of when using entity filters is that they are meant to be applied across an application under all circumstances.
A good example of this is an erp system with multiple organizations, but only certain people have access to an organization. Then you can filter on entities per organization without redesigning each query in an application. The primary example in Moqui is the ActiveOrgNav.qvue file, the mantle.party.PartyServices.setup#UserOrganizationInfo, and the my userOrgInfo rest api in mantle.rest.xml. When you set an organization, it will filter queries in the Find Party screen to those owned by the organization see MantleSetupData.xml line 109.
It can also be used in SaaS software based on Moqui to limit the data that people can see based on the organization that they’re a part of to prevent data from being accessed at the sql query level instead of an application logic level (which is more prone to accident).