How to display sub items in a multi step page?

0
Hi Team, We need to a show step by step process in our app. Entity ‘Procedures’ contains many sub items stored in ‘Tasks’ entity (they have 1-* association  in between them). All items in Tasks are to be displayed one by one on a page. On click of a button on Procedures page, its first Task item should appear on ‘Task_Flow’ page. This ‘Task_Flow’ page will have ‘Next’ button to show next sub item in the list and so on (‘Task_Flow’ page will be used to display sub items data). I’m using this microflow on Procedure page button which is showing first Task item.  Please let me know what is to be done for ‘Next’ button flow. Mendix Version in use is 9.12.1. Thanks!        
asked
2 answers
0

I would personally use an autonumber (or something like that) on the taskentity (assuming you would like to keep the tasks alive as long as they are not finished). You can withdraw the lowest number on the first flow and than take the 2nd number on the next flow, etc.

 

An other option is to remove the first task from the tasklist and create a new entity where you store TasksInProgress or something like that. Than you can keep getting the head of the TasksList (but be carefull how you handle canceling a task).

answered
0

On your ‘Next’ button you can run a microflow that accepts the current task as a parameter. Using this parameter you can then find the next task in the queue and open Task_Flow page passing the next task object.

Probably worth having some kind of a incrementing function that assigns IDs to tasks, so that you can take your current task ID, increment it by 1 and find the next task this way. If you get an empty object that means you’ve reached the end of your tasks flow, so you can move on.

 

answered