Random selection from Roster (only once)

Discussions about CSEntry
Post Reply
sergiofurtado
Posts: 19
Joined: October 5th, 2019, 1:43 pm

Random selection from Roster (only once)

Post by sergiofurtado » November 8th, 2019, 8:20 am

Hello,

In a previous topic I asked for help generating random occurrences in a list. I implemented and it went well.

Now I have a problem and I would like your help. For example, when entering a case, 1 to 5 people from a house are drawn and the following records are directed to these people only (Demographic Characteristics Section). The problem is that when you edit this case, after the demographics section, a new list of drawn residents is generated, different from the original list.

What strategy should be adopted so that the first list of residents drawn does not change during the editing of cases, ie, that the list of residents is made only once?

josh
Posts: 1978
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Random selection from Roster (only once)

Post by josh » November 8th, 2019, 8:52 am

If you are saving that selection on the form somewhere then you can check if it is has already been done and keep the old selection rather than doing a new one.

sergiofurtado
Posts: 19
Joined: October 5th, 2019, 1:43 pm

Re: Random selection from Roster (only once)

Post by sergiofurtado » November 8th, 2019, 11:12 am

Thanks Josh, it worked perfectly!

Post Reply