Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

{assessment_CURRENT_TOTAL} in database

  • rodbro10
  • rodbro10's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 2 months ago #103196 by rodbro10
{assessment_CURRENT_TOTAL} in database was created by rodbro10
Hey,

I need to add assessment_CURRENT_TOTAL in the database. So I maded a

Type: Equation
Text: {assessment_CURRENT_TOTAL}
Adv: Hide question

But in the database it inserts: {assessment_CURRENT_TOTAL} and not the actual numbers for assesment.

What do I do wrong?

Hope for a answer, I did try everything!

Kenneth
The topic has been locked.
More
10 years 2 months ago - 10 years 2 months ago #103197 by Ben_V
Replied by Ben_V on topic {assessment_CURRENT_TOTAL} in database
Hello,

Please have a look here

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
Last edit: 10 years 2 months ago by Ben_V.
The topic has been locked.
  • rodbro10
  • rodbro10's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 2 months ago - 10 years 2 months ago #103200 by rodbro10
Replied by rodbro10 on topic {assessment_CURRENT_TOTAL} in database
Hey Ben,

Not sure I understand, I cant use the hide question?

It should work as I did read about in a another tread:
www.limesurvey.org/en/forum/design-issue...ue-to-database#95787


Hope someone can help?

Kenneth
Last edit: 10 years 2 months ago by rodbro10.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 years 2 months ago #103206 by tpartner
Replied by tpartner on topic {assessment_CURRENT_TOTAL} in database
Yes, it should work as indicated in that thread .

Make sure that you use all uppercase in the tag:


Here is a working sample survey.

File Attachment:

File Name: assess_test.lss
File Size:17 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
10 years 2 months ago #103209 by Ben_V
Replied by Ben_V on topic {assessment_CURRENT_TOTAL} in database
Hello Tony,

I've tried to use {assessment_CURRENT_TOTAL} directly in an equation type question several times before without success and that's why I was still (in 2014) using a basic numerical question + js to store this precious value in the db (to avoid a neverending equation with dozens of qcodes when using radio type questions)...

I've installed your nice sample and I've got this working now... The trick seems that a placeholder type question is required in the same group than the equation question... Why?

Best wishes for 2014

Ben.

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 years 2 months ago - 10 years 2 months ago #103211 by tpartner
Replied by tpartner on topic {assessment_CURRENT_TOTAL} in database
Hey, there's nothing wrong with "using a basic numerical question + js" :laugh:

I suspect (without testing) that if the equation question is hidden and there is no placeholder (or other relevant question), the group is never rendered so the equation question cannot be loaded and stored in the data.

Of course, you can still force the submit as in your example but then you're back to where you started...

Happy New Year to you too.

.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 10 years 2 months ago by tpartner.
The following user(s) said Thank You: Ben_V
The topic has been locked.
More
10 years 2 months ago #103212 by Ben_V
Replied by Ben_V on topic {assessment_CURRENT_TOTAL} in database
Checked!
The group requires an "always shown" question (the equation question itself or another question if the equation is hidden)

Sure that your sample and this discussion will help a lot users (newbies or not) :)
So, thanks again!

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
The topic has been locked.
  • rodbro10
  • rodbro10's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 2 months ago #103217 by rodbro10
Replied by rodbro10 on topic {assessment_CURRENT_TOTAL} in database
Thank you very much, it works just perfect!!
I just needed to make it all upper cases... and wupti.... it worked just as you said.

Again... Thank you!
The topic has been locked.
More
9 years 7 months ago #111765 by Agone
Replied by Agone on topic {assessment_CURRENT_TOTAL} in database
Hello,
i want to do the same without displaying the score to the users.
When i remove displaying, the assessment_CURRENT_TOTAL is equal to 0 ...
thanks for your help
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose