Skip trial based on pre-set value


Author
Message
Steve GJ
Steve GJ
Respected Member (485 reputation)Respected Member (485 reputation)Respected Member (485 reputation)Respected Member (485 reputation)Respected Member (485 reputation)Respected Member (485 reputation)Respected Member (485 reputation)Respected Member (485 reputation)Respected Member (485 reputation)
Group: Forum Members
Posts: 5, Visits: 18
Hi there,  

Started using Inquisit about a year ago, but I don't have a coding background, so I often get stuck with how I'm supposed to write something.

I have 5 different trial types running within a block, but I want to have 1 of the 5 trials skipped/excluded from the block based on a pre-set value.

So I have something like this:  
<values>
/skiptrialnumber = 3
</values>

Then I was trying to insert something into the trial like this
<Trial 3>
/ skip = [trial.3 if (values.skiptrialitemnumber = 3)]
</trial>

But this doesn't seem to work.

I'm guessing I'm just not writing this correctly, but any help would be great :)

Thanks,
-Steve
Steve GJ
Steve GJ
Respected Member (485 reputation)Respected Member (485 reputation)Respected Member (485 reputation)Respected Member (485 reputation)Respected Member (485 reputation)Respected Member (485 reputation)Respected Member (485 reputation)Respected Member (485 reputation)Respected Member (485 reputation)
Group: Forum Members
Posts: 5, Visits: 18
Steve GJ - Sunday, November 5, 2017
Hi there,  

Started using Inquisit about a year ago, but I don't have a coding background, so I often get stuck with how I'm supposed to write something.

I have 5 different trial types running within a block, but I want to have 1 of the 5 trials skipped/excluded from the block based on a pre-set value.

So I have something like this:  
<values>
/skiptrialnumber = 3
</values>

Then I was trying to insert something into the trial like this
<Trial 3>
/ skip = [trial.3 if (values.skiptrialitemnumber = 3)]
</trial>

But this doesn't seem to work.

I'm guessing I'm just not writing this correctly, but any help would be great :)

Thanks,
-Steve

Problem solved.  

/skip [values.skiptrialnumber ==3] in case anyone was wondering.

-Steve
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 105K
Steve GJ - Sunday, November 5, 2017
Steve GJ - Sunday, November 5, 2017
Hi there,  

Started using Inquisit about a year ago, but I don't have a coding background, so I often get stuck with how I'm supposed to write something.

I have 5 different trial types running within a block, but I want to have 1 of the 5 trials skipped/excluded from the block based on a pre-set value.

So I have something like this:  
<values>
/skiptrialnumber = 3
</values>

Then I was trying to insert something into the trial like this
<Trial 3>
/ skip = [trial.3 if (values.skiptrialitemnumber = 3)]
</trial>

But this doesn't seem to work.

I'm guessing I'm just not writing this correctly, but any help would be great :)

Thanks,
-Steve

Problem solved.  

/skip [values.skiptrialnumber ==3] in case anyone was wondering.

-Steve

To clarify / explain why this is so:

"=" is the assignment operator; you use it to assign a value to a variable as in

/ ontrialbegin = [values.myvalue = 42]

-> "The variable with the name 'myvalue' shall henceforth represent the numerical value 42."

"==" is the logical comparison operator; you use it to check if a statement is true or false as in

/ ontrialbegin = [if (values.myvalue == 42) do stuff]

-> "If the statement 'the variable 'myvalue' represents the numerical value 42" is true, do X, Y, and Z."

Steve GJ
Steve GJ
Respected Member (485 reputation)Respected Member (485 reputation)Respected Member (485 reputation)Respected Member (485 reputation)Respected Member (485 reputation)Respected Member (485 reputation)Respected Member (485 reputation)Respected Member (485 reputation)Respected Member (485 reputation)
Group: Forum Members
Posts: 5, Visits: 18
Dave - Monday, November 6, 2017
Steve GJ - Sunday, November 5, 2017
Steve GJ - Sunday, November 5, 2017
Hi there,  

Started using Inquisit about a year ago, but I don't have a coding background, so I often get stuck with how I'm supposed to write something.

I have 5 different trial types running within a block, but I want to have 1 of the 5 trials skipped/excluded from the block based on a pre-set value.

So I have something like this:  
<values>
/skiptrialnumber = 3
</values>

Then I was trying to insert something into the trial like this
<Trial 3>
/ skip = [trial.3 if (values.skiptrialitemnumber = 3)]
</trial>

But this doesn't seem to work.

I'm guessing I'm just not writing this correctly, but any help would be great :)

Thanks,
-Steve

Problem solved.  

/skip [values.skiptrialnumber ==3] in case anyone was wondering.

-Steve

To clarify / explain why this is so:

"=" is the assignment operator; you use it to assign a value to a variable as in

/ ontrialbegin = [values.myvalue = 42]

-> "The variable with the name 'myvalue' shall henceforth represent the numerical value 42."

"==" is the logical comparison operator; you use it to check if a statement is true or false as in

/ ontrialbegin = [if (values.myvalue == 42) do stuff]

-> "If the statement 'the variable 'myvalue' represents the numerical value 42" is true, do X, Y, and Z."

Thanks Dave
-Steve
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search