Randomize ROSTER

Discussions about CSEntry
Post Reply
PHINOJOSA
Posts: 45
Joined: April 16th, 2023, 10:31 pm

Randomize ROSTER

Post by PHINOJOSA »

Hi team

A physical activity campaign is going to be carried out in which for each house only one person must be chosen to participate.

I am registering the members of a family, who are asked for their name, surname, age, sex and if they agree to participate in a physical activity workshop, age does not matter.

Imagen_01.png
Imagen_01.png (84.67 KiB) Viewed 1494 times

But it happens that in a house more than one person accepts and wants to participate in the physical activity campaign. In that case, all the people who agreed to participate should be randomly ordered because the first person (first option) may give up later, in that case the second person would be taken and if she no longer wants to participate, the third person would be taken. and having the list randomly ordered would help a lot to know the order of priority. (On another list)

Here I show you an example of what the other list would look like if it was ordered randomly.

Imagen_02.png
Imagen_02.png (6.48 KiB) Viewed 1494 times

I hope you can help me with this dilemma I have.

I greatly appreciate your support as always.

I share the project with you so you have all the tools.

Best regards,
Attachments
01_Random_selection.zip
(43.72 KiB) Downloaded 19 times
justinlakier
Posts: 152
Joined: November 21st, 2022, 4:41 pm

Re: Randomize ROSTER

Post by justinlakier »

Hello,

First, make a list of all the indexes of the roster that you want to randomly select from. Use RandomIn() to pick a random index from here, adding all the details Name(index), Age(index), Sex(index), etc from your old roster to your new roster at row 1. Then remove the chosen index from your list of indexes to prevent duplicates and repeat the loop, this time copying to the new roster's row 2, and so on until your original list of indexes to copy over is empty. This will copy every member in the old roster to your new roster in a random order.

You can check this thread on the forums and this thread on the forums for more resources using Random to select from rosters.

Hope this helps,
Justin
PHINOJOSA
Posts: 45
Joined: April 16th, 2023, 10:31 pm

Re: Randomize ROSTER

Post by PHINOJOSA »

Dear justinlakier

Thank you very much for the support. I'm going to put it into practice, I hope I can achieve my goal, otherwise I'll come back for more support, thank you very much.

Paul HM
khurshid.arshad
Posts: 572
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan

Re: Randomize ROSTER

Post by khurshid.arshad »

I have a tutorial on randomize selection by using kishgrid. Here is the link.

https://www.youtube.com/watch?v=XZi0kJlfI_s

I hope it will work.
a.
PHINOJOSA
Posts: 45
Joined: April 16th, 2023, 10:31 pm

Re: Randomize ROSTER

Post by PHINOJOSA »

Dear friend khurshid.arshad

Thank you very much for your support, your videos are very educational.

Atte.
Paul Hinojosa
Post Reply