Selecting Multiple Options

I would like to select multiple options from an option list and store them in a table. Example: With the months as an option string, the selection would be June AND July. How can I do this?

Hi, you can’t do the multiple selection in Option list.

Create a boolean field for each option instead of your original option field.

You should use the ‘pipe’ ==== | ==> say June|July in the filter. if not working use the number of the month ==> 6|7 (representing the order of the option list)

Michael, the pipe is only useful for setting filters, not for selecting.

You could use a lookup table and with a form highlight/mark(Ctrl+F1) your selections. Then in your code you would use Form.SetSelectionFilter(Rec) to capture the records you want.

Hi Just an idea. Run a StrMenu as long as you need it. You want to write it into a table. How? I show in my example how a filter could be created. y:=0; i:=0; Repeat x = StrMenu('Jan,Feb,Mar,Apr,May ....,Ready); i:= i +1; //example: create a filter if (x <>0) and (x <> 13) then if i = 1 then filterTxT:= Format(--Calculate your Month/Date--) else filterTxT:= filterTxT + '|' + Format(--Calculate your Month/Date--); message('Current filter: '+filterTxT); until x = 13; //Ready bye André

Andre’ your example works, except that I get the number options and not the words. Any idea how I could get the text to show up instead of the number?

Hi

quote:


Originally posted by mbricco
Andre’ your example works, except that I get the number options and not the words. Any idea how I could get the text to show up instead of the number?


As I wrote in my first posting I don’t know what exactly do you need. Month as text? Perhaps DMY2DATE can help you Replace *Format(--Calculate your Month/Date--)* with Format(DMY2DATE(1,i),0,'<Month Text>'); bye André

Eventually also check how the “By Dimension” selections work in Report 790. Here you have a multiple Option Selection.

I just used months in my example. The real options are a list of processses. What I want to print is the text that goes with the option number selection. Now I only have numbers, and my list is 22 selections long. I have not checked the reprot, but will-Thanks[:)]

MB Var FieldOption Option OptionString ‘May,Jun,Jul’ If You output FieldOption this will diplay an Integer ie, 0,1,2,… to diplay the text you need Format(FieldOption); ie, May,June Jul,…

I tried Format(option); Doesn’t work. :frowning: I still have numbers and no text. Any other suggestions?

Say you have a STRMENU(May,June,July); You could have this VarOption Option OptionString ‘,May,June,July’; the first option of your optionstring needs to be blank or anything as Options start at Zero(0) and STRMENU start at one(1) and then the rest of the OptionString must be the same as the STRMENU options. Then code VarOption := STRMENU(May,June,July); and then output the Variable VarOption. depending on how you output the variable you might need to FORMAT(VarOption)