Making Page Specific Objects

0
Hello! I am trying to make an app that has a specific hierarchy, with objects that need to be specific to the pages that they were created within. An example of this is a portion of the app that contains a to-do list, with the list items being specific to one specific work site. There are currently multiple work sites within the app, all of which have their own specific to-do lists. The issue that I am working through is that when a to-do item is created in one work site, it shows up as a to-do item for all of the work sites. I have tried three main methods of creating these to-do items.  The first method I attempted was just putting the button that creates a to-do item on the page specified for the work site that I wanted the to-do list item created for, expecting them to be put automatically into the correct page view. I saved the to-do items to a list. This did not work, and the to-do items showed up on the list views for every work site.  The next method I tried was list filtering. Once I realized from attempting method 1 was that all of the to-do list items were being put into the same category, I decided to attempt to then filter this category instead of creating them to be seperated initially. To accomplish this, I had the button that was made to create to-do list items add all of the items to one list. I then used the list filtering option to attempt to separate the list into work site specific lists. I wasn’t able to get this option to work, and regardless of the sorting function I was unable to get the list to filter based on my worksite attribute. My most recent method works for what I am trying to accomplish, but is impossible to scale to the level that is necessary for the applications of this app. I have found that by preallocating to-do list objects alongside the worksite when the worksite is created, the to-do items will be designated to the site they were created alongside. This works, but is unfortunate as this requires the creation of an entity for each to-do item, as well as an individual page and microflow to fill out the details of each to-do attribute. This becomes clunky and problematic as there are theoretically infinite to-do items that will be created per worksite, and it is impossible to pre-allocate and initialize them all.  If anyone has any suggestions about how I could go about this seemingly simple process in a more effective way I would truly appreciate it. Please let me know if there is anything I can clarify about how I am attempting a solution now. Also, I am on mendix version 9.15.0, but there was no option for it in the drop down.   
asked
1 answers
4

Hi Nicole,

You have different todolist pages for different work sites right? Then its simple!

Have a extra attribute or association as “WorkSite” in todolist entity. While creating a todo list, in the save button have a microflow to set worksite name in todolist object.

After this , In list view you can just have a Xpath like Eg., [Worksite=’Worksite1] .

Hope this helps!

answered