When to put a $ sign to indicate a variable in builder?

I was not able to find an answer in either the forum or psychopy docu, but when to put a $ sign to indicate a variable in builder? If “$” is included in the field name, don’t I have to type it separately into the field (and vice versa if it is not included in the field name)? Or is there no such rule?

The reason why I’m asking is because if a variable (which may be specified earlier in the experiment) is added as “random seed” in builder with $variable_name to specify the seed of a loop, it is not interpreted as a variable called variable_name by psychojs, but as $variable_name, what raises an “undefined” error. However, with psychpy it works perfectly fine. Is this hence an issue with psychojs?

@4twobi, if there is a “$” in the field name of a component or loop, then you can omit the “$” when adding code. So, “random_seed $” needs no “$” to indicate the use of code, but “Conditions” does e.g., $“conditionFile” + group + “.xlsx”

1 Like