To select multiple item from the checkbox simultaneously

Hello All,

I have a function for activating the checkbox but I want to select both the checkboxes simultaneously.

Can anyone help me out.

Pre-requiste:

I want to make sure that the second checkbox only is not selected in any of the event(there can be one selection for first checkbox).

void activate_checks(DBE checks)
{    
    combined = get(checks)    
    for i in 0:len-1 do
    {
        rem = combined%2
        val[i]=rem
        combined=combined/2
    }

}


KBSri - Wed Jan 28 07:20:18 EST 2015

Re: To select multiple item from the checkbox simultaneously
KBSri - Fri Jan 30 00:23:24 EST 2015

Can somebody help me out?

Re: To select multiple item from the checkbox simultaneously
Mike.Scharnow - Fri Jan 30 09:49:29 EST 2015

KBSri - Fri Jan 30 00:23:24 EST 2015

Can somebody help me out?

I'm really sorry, but I do not understand your question. But anyway, from looking at your code and comparing it with the DXL help I see the construct .. %2 -- it seems that this confused you. 

I'll try it in other words. Let's say you have one DBE of type checkbox (named "dbChecks") with three check boxes.

To check or uncheck values, you have the command

set (dbChecks, iValue)

DXL help says "The initial and returned values are bit maps indicating whether each option is checked." --> this means that you have to calculate the value to set. A single checkbox value is represented by one bit (0/1). 0 is off, 1 is on. For each checkbox, one bit is reserved. So, from your three check boxes (0, 1, 2) let's say you want the first and third to be checked, so you'll have to calculate iValue by

iValue = 1 * 2^0 + 0 * 2^1 + 1 * 2^2 = 1 + 0 + 4 = 5.

So, set (dbChecks, 5) will do what you want.

Hope this helps in solving your problem.

BR,
Mike