Dynamic variables
Hi everyone,
We are having a bit of an issue regarding dynamic variable.
When using in flow control (like repeat_cycle), variables's value are updated throughout the study, but in sketchpad, trying to use in Show if or in text like [myvar] , it looks like the value of the variable is baked in on "Build", so it does not update throughout the flow.
Is it a normal behavior for WebOS and use of dynamic variable is not possible or are we missing something?
Thank you for your help!
Comments
Hi,
You must be missing something, because variables do update. A common mistake is that the value of a variable in a sketchpad reflects its state during the prepare phase and not the run phase, meaning that response-related changes are not incorporated. However, across trials even in sketchpads there should be a change noticeable, provided that the variables changes across trials. Can you maybe share a simple version of your experiment that suffers of that problem? I can try to take a look.
If you want to explore yourself, I recommend you print out the value of the variable on every trial to the console, to actually see what value it has.
Hope this helps,
Eduard
Hi Eduard,
Thanks for your answer.
I think there is a confusion with sequencing but unsure.
Attached is a simplified example, logging state of
accvariable in javascript and then trying to display the value inpractice_completedsketchpad.Thanks again for your help.
Yoann
Hi Yoann, I can't see an attachment?
My bad, updated previous comment!
Which version of Opensesame do you use? With OS4, I can't open your experiment, with OS3, I can open it, but cannot run it.
In any case, try replacing the practice_completed sketchpad with a feedback item.
Odd you could not open the file, but feedback did the job!
Thanks for your help! Coffee on me :)
Nice, thanks!
Odd you could not open the file, but feedback did the job!
Thanks again for your help! Coffe on me :)