How can I read a array variable with $variableApi->getPSL?

35 views
Skip to first unread message

sstguenth

unread,
Jan 25, 2016, 1:07:55 PM1/25/16
to SoPHIE Community
Hello,
I use a FormScaleMulti-Steptype with 10 Field-Scale-Items. From this single items I ´d like calculate a total value. I think that the FormScaleMulti-variable is a array? But  how can I read a array variable with $variableApi->getPSL?
Can anybody help me further?
Thanks. Stephan

Steffen Beverborg

unread,
Jan 26, 2016, 7:26:33 AM1/26/16
to SoPHIE Community
Hello,

To get a total value of the single items you can simply add up all the variables. If you run a session with the standard settings you will see that for every item there will be a single PSL variable within the "Variable" tab of the session administration. The name is a combination of the variable name within the processing tab and the item names leading to "scale_item1" for example. Now you can simply use $variableApi->getPSL() to get the values.

I hope that will help you.

Kind regards
Steffen
Reply all
Reply to author
Forward
0 new messages