Unfortunately, the CLEAR instruction model doesn’t really have any use on its own. Its job is simple: to remove all the options and option prompts from the specified multiple choice ("MC") variable. That’s it. When used in conjunction with the ADD instruction (which adds options & option prompts to a specified MC variable), you end up with a pair of commands that can dynamically build MC variables on the fly, based on whatever data you desire.
CLEAR MULT_CHOICE
Filtered ADDing to MC Variables
Quite often, you’ll want to dynamically create the options of a multiple choice variable from a repeating dialog (or other source). This HotDocs snippet will detail how you can do that. The concept is simple - if you ADD an option to the MC variable, you also accumulate the ADDed value in a text string, so that you can test against that string later. Then, each iteration, you test whether the current value you may wish to add already exists in the text string and if it does, you do NOT ADD it. If it does NOT exist, you ADD it to the MC variable, and also to the text string.
Statistics
Page Views: 44501
Page rendered in 0.2528 seconds
35 queries executed
Total Entries: 154
Most Recent Entry: 03/12/2010 07:07 pm
Total Members: 5
Total Logged in members: 1
Total guests: 14
Most Recent Visitor on: 03/12/2010 07:14 pm
Most visitors ever: 46 on 03/04/2010 11:35 am