Random selection from Roster (only once)

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
sergiofurtado
Posts: 29
Joined: October 5th, 2019, 1:43 pm

Random selection from Roster (only once)

Post by sergiofurtado »

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: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Random selection from Roster (only once)

Post by josh »

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: 29
Joined: October 5th, 2019, 1:43 pm

Re: Random selection from Roster (only once)

Post by sergiofurtado »

Thanks Josh, it worked perfectly!
Post Reply