Create a page with a data grid with accounts and the datasource xpath.
Set the xpath to
[Account/Account_Caregroup/Module.Caregroup/Account_Caregroup = $currentuser]
(change to your correct entitynames)
This means that the account must belong to the caregroup where the current user belongs to.
Set the forms 'visible for' to 'Coordinator'
Edit 1: I Assume that both coordinators and patients are accounts
Thanks for your fast reply, The only thing that does not match is that we just have a entity care group with attribute 'name' string (which is associated to patient and coordinator, Patient and Coordinator are also connected).
And with accouns do you mean the the administrator.account entity? or our coordinator entity?
Thanks
Hello Mairen,
Try never to answer your own question but edit your original question. And he means the administrator.account entity. But from your text it seems you do not use that (unless you made the mistake to directly inherit from user instead of account). In my opionion you should have let the employee inherit from account which inherit from system.user.
Since patients are no users I think it might be simpeler to create a datagrid with a datasource microflow where you pass the current user. In this datasource retrieve the Caregroup of the current user. Then you could retrieve all the patients belonging to that Caregroup and return the list of patients in that microflow.
Regards,
Ronald