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: 56079
Page rendered in 0.2711 seconds
35 queries executed
Total Entries: 167
Most Recent Entry: 07/23/2010 04:36 pm
Total Members: 5
Total Logged in members: 0
Total guests: 24
Most Recent Visitor on: 07/30/2010 02:22 am
Most visitors ever: 54 on 07/20/2010 04:49 pm