Scheduling app (how to iterate through permutation/combination)

Scheduling app (how to iterate through permutation/combination)


Hi, I am creating a mobile app with rather heavy logic and probably long loading times because of one particular action.

The app is for 10 users. It should allow each user to select dates in a month which they are unavailable to complete their duty. After everyone has submitted their set of dates. The app should be able to advise which day should a particular person do their duty, minimizing the number of bad matches (a bad match is where a person is allocated a duty day where he/she already indicated that he/she is unavailable). This sounds rather complex; is there a way to achieve this?

I thought of using a score system, where the system will run through each combination and determine how many bad matches and how many successful matches, then the user can proceed to choose from a few selected combinations. But how do I iterate through each and every combination?

Hi Li,

If I got your question right, you want to create an app allowing a given user to select dates in wich he is unavailable.Then it allows him to select working dates, preventing from selecting unavailable dates. Is that right?

If so, have you considered using the Calendar widget from the OutSystemsUIMobile? Then you could store the dates the user picks as unavailable in the Calendar widget, and then simply feeding them as disabled dates to the calendar when selecting working dates.

Hope it helps, feel free to ask further questions.

Best regards,



The app performs more like the below description.

My organisation has a duty roster system where a certain 10 people will take shifts to manage an area, rotating every day. This app is meant for these 10 users, and aims to find out the days which they each are unavailable, and come up with a few proposed schedules of the duty roster for that month.