I have just started learning the Cuba Platform, which is great.
I have the following scenario.
Entities:
Users - Name, Mobile No, email
Committee Master - Start Date, End Date, IsCurrentCommittee
Committee Members - Member (from Users), Designation
Departments - Department Name, Description
DepartmentOwners - Department (from Department),
Owner (from Committee Member - which comes from Users)
Committee Members are selected from the list of Member Users. A Committee has a defined tenure. So Committee Members change.
So When I try to define Department Owners I need to have the following:
Departments
Committee Members
I do have them. However there is a problem. From the screen I created using the view, I see all the Committee Members evne those who are not part of the Current Committee.
Is there a way I can define that?
Something like the following:
select users from Users, Committee_Member, CommitteeMaster
where Users is a Committee_Member and
Committee_Member part of currentCommittee
welcome to the CUBA world It’s good that you enjoyed it so far.
In order to help you, it would be good if you share an example project, that will show your problem in more detail. Then we can see the screen & view definition.
Current Committee as the name implies is the current committee.
Similar to say a government.
There is the current government & there may be past governments.
What I want is that I only want to select department / complaint owners from the current committee / government.
I hope that answers your question.
Attach files with useful information
Do not flood a topic with all the output of your application. Attach additional information like logs and screenshots as files. It is recommended to use GitHub if you want to share a project. Alternatively you can pack a project to ZIP using the built-in zipProject Gradle task and attach it to a topic.
Thanks you for your replies Mario.
Having some issues with the gradle project.
So, am attaching some screenshots.
Let me know if anymore information is needed.
Entities specify the Entities that I have used.
Data, so that explains the situation.
So if you look at the data.
There are 2 Committees
First Committee - isCurrentCommittee is false. Has one member
- Taranjeet Chabbra
Elected Committee - isCurrentCommittee is true. Has one member
- Satish Inamdar
In the ComplaintOwnerSelection pic. I am trying to set an owner for each Complaint Category.
Here when I select the Committee Member, the members need to come only from the Committee which has isCurrentCommittee set to True. (“Elected Committee” in this case).
So, I should only see “Satish Inamdar” in the dropdown.