Express Entity object with multiple associated objects
Permalink 1 user found helpful
Hi,
I am still trying to grasp Express Entity, but I immediately see incredible benefits and use for it in my applications. From what I can tell so far, I don't think the following is possible using the Express Entity back end default functionality:
I have a primary Express Entity object called EMPLOYEE. In the form for that EMPLOYEE, I'd like to add multiple associated repeating Express Entity objects called TIME_ENTRY - which would be made up of a date/time field and a description. I could pull up the EMPLOYEE form and add multiple time entries within that form. Also, I would want to be able to go to the TIME_ENTRY object entries and view a list of all time entries regardless of employee.
Am I correct that this is beyond the default capability of the Express Entity back end, and if so, how would I approach this on a custom front-end to associate the time entry with a particular employee? Traditionally I would have a list of employees, and I'd click a button to add a time entry for that employee, pass the employee ID to the time entry form/controller, and insert the time record into a table with the employee ID foreign key value. With Express how would I make this association? If I create the association on the back end, what is the magic that makes that association that I can leverage in my custom code?
Thanks!
I am still trying to grasp Express Entity, but I immediately see incredible benefits and use for it in my applications. From what I can tell so far, I don't think the following is possible using the Express Entity back end default functionality:
I have a primary Express Entity object called EMPLOYEE. In the form for that EMPLOYEE, I'd like to add multiple associated repeating Express Entity objects called TIME_ENTRY - which would be made up of a date/time field and a description. I could pull up the EMPLOYEE form and add multiple time entries within that form. Also, I would want to be able to go to the TIME_ENTRY object entries and view a list of all time entries regardless of employee.
Am I correct that this is beyond the default capability of the Express Entity back end, and if so, how would I approach this on a custom front-end to associate the time entry with a particular employee? Traditionally I would have a list of employees, and I'd click a button to add a time entry for that employee, pass the employee ID to the time entry form/controller, and insert the time record into a table with the employee ID foreign key value. With Express how would I make this association? If I create the association on the back end, what is the magic that makes that association that I can leverage in my custom code?
Thanks!
Express Objects do not seem able to handle multiple form inputs for a singular association.
I'd be interested to hear if this changes, but as my understanding of Concrete5 grows, I think I have a sense of why this would be very hard to implement.
I have gone about creating my data model a little differently and that has served me just fine.
I'd be interested to hear if this changes, but as my understanding of Concrete5 grows, I think I have a sense of why this would be very hard to implement.
I have gone about creating my data model a little differently and that has served me just fine.
In my particular case, there is a "Schedule" express object with a single many-to-one association with a "Time Entry" express object. "Time Entry" has a single Text attribute. "Schedule" has no attributes, but a form with multiple "Time Entry" associations named things like "Monday Open", "Monday Close", "Tuesday Open", etc.
So, I am trying to retrieve, say "Monday Hours" which is a name of a "Time Entry" association belonging to a "Schedule" express object.
Knowing how to get at this via the php in an Express Detail Block custom template would be really helpful.
I've looked athttps://documentation.concrete5.org/developers/express/creating-read... but I haven't been able to get there yet.
Thanks!