Re: Re: IFROUTE and MATRIX

Joel Palmius <[email protected]>
Newsgroups gmane.comp.apache.mod-survey.general
Message-ID <[email protected]>
Yes, within one MATRIX. Although I haven't really tested what happens if 
you have more than 99. If the base variable name is 5 chars or less, my 
guess is it'd simply continue counting.

   // Joel


On Tue, 16 Nov 2004, Martin Ertl wrote:

> so there can be up to 99 MATRIXROWs?
>
> Joel Palmius wrote:
>> If it doesn't work, then it's a bug. There should not be any difference 
>> between a MATRIX variable and any other variable.
>> 
>> However, in this case I don't think it is my fault. :-)
>> 
>> You have confused the CAPTION of a matrix row with the variable name. The 
>> variable name is the name of the matrix + number of row, in this case for 
>> example myMatr01. Thus the correct ifroute should be:
>> 
>> <MATRIX NAME="myMatr" CAPTION="TestMatrix" >
>>  ...
>> </MATRIX>
>> 
>> <IFROUTE DEFAULT="default.survey">
>> <IF BOOLOP="and" THEN="yes.survey">
>> <EQUALS VALUE="1" VARIABLE="myMatr01"/>
>> <EQUALS VALUE="1" VARIABLE="myMatr02"/>
>> <EQUALS VALUE="1" VARIABLE="myMatr03"/>
>> </IF>
>> ..
>> </IFROUTE>
>> 
>> Possibly, there should be an error checking here so that the *ROUTE tags 
>> complain if they are checked against a non-existent variable.
>> 
>> I have not tested the above.
>> 
>> // Joel
>> 
>> 
>> On Wed, 10 Nov 2004, Martin Ertl wrote:
>> 
>>> Is it right that IFROUTE doesn't work with MATRIX?
>>> 
>>> Imagine two columns (yes and no) and a few lines.
>>> So the aim was to do routing dependent on answers.
>>> For example user clicked "no" everywhere or
>>> user clicked "yes" everywhere
>>> 
>>> If this really doesn't work we have to talk about it
>>> on devel list...
>>> 
>>> 
>>> If DEFAULT parameter is set, default.survey is called,
>>> independent of userselection
>>> If DEFALUT parameter is left blank, data is submitted
>>> and nothing else happens (also independent of userselection)...
>>> 
>>> 
>>> 
>>> <MATRIX NAME="myMatr" CAPTION="TestMatrix" >
>>> <MATRIXCOLUMN VALUE="0" CAPTION="no"/>
>>> <MATRIXCOLUMN VALUE="1" CAPTION="yes"/>
>>> <MATRIXROW CAPTION="line0"/>
>>> <MATRIXROW CAPTION="line1"/>
>>> <MATRIXROW CAPTION="line2"/>
>>> </MATRIX>
>>> 
>>> 
>>> <IFROUTE DEFAULT="default.survey">
>>> <IF BOOLOP="and" THEN="yes.survey">
>>> <EQUALS VALUE="1" VARIABLE="line0"/>
>>> <EQUALS VALUE="1" VARIABLE="line1"/>
>>> <EQUALS VALUE="1" VARIABLE="line2"/>
>>> </IF>
>>> <IF BOOLOP="and" THEN="no.survey">
>>> <EQUALS VALUE="0" VARIABLE="line0"/>
>>> <EQUALS VALUE="0" VARIABLE="line1"/>
>>> <EQUALS VALUE="0" VARIABLE="line2"/>
>>>    </IF>
>>> </IFROUTE>
>>> 
>>> 
>>> 
>>> Martin
>>> 
>>> Skickat av Martin Ertl <[email protected]>
>>> till survey-discussion
>>> 
>>> 
>> Skickat av Joel Palmius <[email protected]>
>> till survey-discussion
>> 
>
> Skickat av Martin Ertl <[email protected]>
> till survey-discussion
>
Skickat av Joel Palmius <[email protected]>
till survey-discussion
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.