datagrid inherit from microflow

This is my micro flow This is my entitiy and i have a Data View sourced to a schedule so it will show the properties : Start time, End Time, Schedule ID, Venue. And inside my Dataview i have a Datagrid which is sourced to my microflow because im trying to show all the User Names that attended this schedule. i have to 2 erros : Microflow does not return a list. Error(s) in microflow expression. The second error highlights my tbUserList and IteratorAttendaceAttendee. In my microflow the way i made it was. Parameter is my tbSchedule. START. GetAttendanceAttendeesList where scheduleID equals $tbSchedule/pkScheduleID. Create Attendee_CommitList ENTER ITERATOR Iterate Thru GetAttendanceAttendeesList GetUserList where UserID = $IteratorAttendanceAttendee/UserID If Exist Change IteratorAttendanceAttendee (AttendanceAttendee_tbUser) Add to Attendee_CommitList LEAVE ITERATOR Commit Attendee_CommitList END I understand that i pretty much have to create a list, and get values into it and return that.
4 answers


A couple of questions/thoughts:

  • the microflow you show does return a list of tbUser objects. Using this as a source for a datagrid should work fine - the datagrid will display tbUserobjects. What error message do you get? Also, without being able to see what is inside of the two Microflow Activity boxes that have errors, its hard to understand what the problems might be.
  • your domain model image does not show the type of associations, but depending what those types are, you should be able to source your datagrid without using a microflow. If you haven't already, you can try source type database and then navigate through the associations to get the users who attended a particular event
  • This is unrelated to your question, but probably a best practice/Mendix approach: looking at your domain model, there is no need for you to define an ID column for each entity, unless you want to. Mendix maintains an internal ID for each object in an entity. You can access this attribute, called the Global Unique Identifier or GUID, if you need to, however, in my experience, its pretty unusual to need to access that ID.

Hope that is helpful,



Hi Mike, i used database replication, and module reflection, and imported all the data. To map it correctly, they needed a key column. I used a microflow because the association between entities didn't work. most properly because like you stated, mendix manages its own internal ID for each object in entity. so if im only viewing data that i imported, mendix wont be able to associated them together. this causes alot of problems for me because, i have to micro the logic "Where this ID Equals That ID".

On a side note i manage to come right with my microflow. basically the logic that worked for (and ill post a link to how it looks, for anyone else who be struggling too)

  • Get a list of attendees from the Database, where schedule ID equals Parameter ScheduleID
  • Create a User List 'CreatedUserList'.
  • Create a Iterator for Get list attendees. (inside the iterator)
  • Get First user where Iterator Attendee_userID equals UserID.
  • If exists
  • Change object (variable - IteratorAttendee, Commit - no, Refresh in client - no) (member - Attendee_User, Type - Set, Value - $UserList)
  • Add to CreatedUserList (Variable - CreatedUserList, type - add, Value - $UserList)
  • Outside Iterator
  • Commit CreatedUserList
  • Red Event (return list, Entity - User, Value - CreatedUserList)

My Issues are still heavy frustrating though. Because i still have to in my original description i mentioned that i have a dataview with a schedule and nested Datagrid views that use this microflow.

my Original Dataview has schedules Start and end time, now i need to show the venue just underneath that. Like you mentioned i just drag the venue name from the "Connector" association from Schedule To Venue, which is giving me a blank. How will i be micro-ing this now?


when Dealing with database replication and module reflection. is there a way to fix how associates dont get properly added when importing data?


by using something like this in my Xpath

Attendee/ScheduleID = Schedule/ScheduleID

it worked for me.