Calendar : create association not set when using microflow and view start attribute+view end attribute

0
Hey there I got an issue, which seems to be quite similar to this one, although the fix doesn’t work for me; Here is my configuration: I got an entity “Tour”, which is linked to a “TourSchedule” entity (which is not persistable, cause the schedules are not stored directly) I got a “tour view”, which contains the calendar I got a microflow which I use to retrieve all the TourSchedules (mandatory) My calendar displays the schedules correctly The problem is : when I configure the “create” behavior, the newly “TourSchedule” object has his “start date” and “end date” fields set, but the relation with “Tour” entity is not. Any idea ? Do I have to make “TourSchedule” entity persistable ? [EDIT : I checked with a persistable “TourSchedule”, but still the association with “Tour” is not set] Thx !
asked
4 answers
0

How is the object created? I probably would use a microflow that creates the object, sets the dates and also sets the reference. If this does not work edit your post with a screenshot of your domain model and the page / microflow where you create the object.

Regards,
Ronald

 

answered
0

Well, the TourSchedule object is created by calendar itself, thanks to “On create microflow” setting ; I indeed use a microflow, with has the “TourSchedule” parameter.

The calendar widget creates the TourSchedule, sets the dates (depending on where the user clicked on the calendar), and is supposed to set the association I configured in “Create association” setting too. The fact is : the dates are well set, the association is not.

 

answered
0

Summary

I uploaded the project here : https://github.com/lordlothar99/Mendix-testapp/blob/master/TestApp.mpk

My project organization :

The model:

Just to be clear :

  • Creation of new TourSchedule using microflow “NoBounds” works fine (reference to Tour is well set by calendar)
  • Creation of new TourSchedule using microflow “WithBounds” doesn’t work (reference to Trou is not set by calendar)

 

“NoBounds” configuration (okay)

Microflow “GetTourSchedules__no_bounds”

 

Calendar config

 

“WithBounds” configuration (ko)

Microflow “GetTourSchedules__with_bounds”

Calendar configuration

 

 

answered
0

Hi Ronald,

I saw you created a pull request with some improvements in order to make this work. But your configuration doesn’t use “view start” and “view end” attributes in the calendar’s microflow. So it wouldn’t work for me, cause I would have too many objects..

Anyway I worked on this, I finally found a not-too-ugly way to make this work : Create a “TourSchedulePaging” object, with an ugly association to TourSchedule…

I commited the new version : https://github.com/lordlothar99/Mendix-testapp/blob/master/TestApp.mpk

Anyway, I think this is a bug (if not, why would there be a configurable “create association” ?)

answered