I am finding it difficult to add filter for FamilyAdmin as FamilyAdmin can see data added by FamilyMember and FamilyAdmin but not the data which are added by SuperAdmin. How can I achieve that as there will be two roles to check in single filter condition?
What roles I am providing is as follows:
1. SuperAdmin : Can View all the data in a table (Done)
2. Admin: Can View data which is added by Admin and user(Finding it difficult to do this already perform filter aggregation and all but still facing problem)
3. User: Can View data which is only added by user(Done)
I am attaching my oml file for reference:
Hi @Kapil Joshi ,
you datamodel is not optimal, for example, I don't understand why you would have family member name as text attribute in expense, but i only removed some indexes you had on your family member table to be able to add testcases (you had a unique index on just about every attribute, including the family someone is in. That means you would only be able to add 1 member per family.
Anyway, see attached oml, you had a bit of a mess in the expences screen with 2 aggregates and a data action, I removed 2 of them, only left one, and this is the aggregate that will give you your desired behaviour.
The yellow parts help you with showing all family expenses to family admin
Dorine
Hello @Dorine Boudry,
Thanks for the help, I had checked the oml file but still family admin is unable to see data added by family member.
Regards,
Kapil
how exactly did you check, what is your test data ??
this is my test data
I (7) only have member role, I'm member of beatle family, but your software doesn't limit me yet to only adding expenses there
BeatleAdmin (21) has family admin role and is a member of the beatle family
StonesAdmin (22) has family admin role and is a member of the stones family
StonesAndBeatlesAdmin (23) has super admin role
Also, please don't start multiple posts with the same question, this was the second and you have started a 3rd one this morning.
Thanks, will test again and check for the same.
Yes sorry, I had already delete the new post.
Thanks,
Hello @Dorine Boudry ,
You had created stones admin role and beatle admin role sepearately? Test1 data which you added in beatle family can see data by beatle admin in your case but I am unable to do that.
Warm Regards,
nope, there is just familyadminrole, 2 users have that role, one of the users is member of the beatles family, the other is member of the stones family
Don't know why you share yet again your oap, this one you share does not have my changes in it, so I can understand it is not working.
Hi @Dorine Boudry,
In your file I am getting this error while inserting family member master data.
all i wanted to do is explain how you could build that filter condition. there is a lot not working correctly / not designed correctly in your application, that's far beyond the scope of the time I have.
If your screen for adding a family member is not working, you will need to debug it. It really has nothing to do with 'my file', I see you changed the design of the familymember table to having a reference attribute towards user instead of using user identifier as your id. (you should not make that protect, I think)
I think that's a good move, but how are you going to attach that family member to that OS user (tell OS which userid corresponds to which family member), there's a lot of design / build / test work that you just haven't done yet.
Hello,
I used the GetExpensesDetailByUserId aggregate filter from the Expenses screen as an example, am I looking in the right place?
When the user has the FamilyAdminRole, the filter just joins the two entities based on the FamilyMasterId attribute, but you are not actually filtering the aggregate:
Also, this join condition is already defined in the Sources tab:
With that said, I think this filter line is what you need to replace with something that actually filters your aggregate to fix this problem.
I hope this helps you!
Best regards,
Miguel