Hi, I have a question regarding showing material listing. I have multiple contractors in my system with all their materials listing. For example Contractor A, Contractor B, Contractor C and so on . So right now i would like to restrict all the contractors from looking to each other materials. So that each contractor can only view their specific material listing.
Please help me on this
Hi Jaydav Vasudevan ,
follow these steps
1. put the user id into material entity. and set the user id for individual's material while saving the material details.
2. while listing the materials add the filter for material.userid=Getuserid() into the aggregate for listing. by this each of the contractor would be to see the own material only. if it doesnt help please try to attach the oml or screenshots so would be able to help more.
Hope this will help
Thanks
Prince
Hi, PrinceCurrently i have Contractor entity, material listing entity. Material listing is currently tied to contractor id
The filter i should add it at the material listing aggregate in the materials screen right
yes. @Jaydav Vasudevan
So, this is my screen of materials page
So i must add my filter in the aggregate. So i believe my filter should be materiallisiting.contractorid=Getuserid()
This is what i get when i fill it in.
Hi,
You are comparing a "ContractIdentifier" with "UserIdentifier".
GetUserId() is a function that returns the identifier of the user. Not the contractid.
Is Contractors are users who is logging into the application?
Regards,
Wasimkhan S
convert the contractor id to User identifier in the entity. i hope this will work.
Hi @Jaydav Vasudevan ,
what exactly your filter should be, depends on how you make a link between a logged in user, and a contractor.
We don't know that, can you tell us and/or show your datamodel ?
Dorine
Hello,
It sounds like you could benefit from OutSystems' multi-tenancy capabilities. In your case, each contractor would be a tenant, with its own isolated data.
Here's some documentation explaining how this works in OutSystems.
Hi Aurelio I will look into it ya thanks
If its only matter of contractor listing and their different material list then don't think should go for multitenancy. Solution suggested by Prince will work. Store materials data with contractor id.
regards