Pass association when creating new event in calendar

Hi all, My problem is (easily) the following: I have a number of users and those users have activities. On a page I have a data grid with all the users. Below there is a dataview that listens to the data grid. When selecting a user in the grid, a calendar shows up in the dataview with all the activities of the selected user. Now I want to add or edit activities by clicking in the calendar. Editting an activity is not a problem, but making new activities is. When I click an empty day in the calendar a microflow is called, but the parameter of this microflow is activity. This new activity has only a date (the one I clicked in the calendar), but I can not retrieve the user I want to add an activity for. How can I make the selected user available in the microflow? Thanks in advance for your help!
2 answers


First, I assume that you are using one of the latest versions of the Calendar widget ... I think that the latest version is about 4.2.+.

Second, I also assume that you have an association between the User entity and the Activity entity such that one User can have many Activities. I will assume that this association is named MyFirstModule.Activity_User.

If this is all true, and your Calendar widget is sitting in a dataview that listens to the User data grid (which you indicated that you are doing), then I believe that all you need to do is to properly set the "New event reference" property on the "Behavior" panel on the Calendar properties.

Under that you probably want to select: "MyFirstModule.Activity_User/MyFirstModule.User", assuming that I have guessed your entity and association names properly.

Then, in your "AddNewActivity" microflow that has a "NewActivity" fed into it, you should be able have a "ChangeObject" action activity that sets the association MyFirstModule.Activity_User of type MyFirstModule.User to the value "$NewActivity.Activity_User".

I hope this points you in the proper direction.

Good luck,



Hi John,

Thanks for your quick answer. Your assumptions were correct as well as your solution! Many thanks again!