Welcome, Guest
Username: Password: Remember me

TOPIC: cannot get the equation value in EM!

cannot get the equation value in EM! 3 months 5 days ago #109945

  • iscar
  • iscar's Avatar
  • OFFLINE
  • Gold Lime
  • Posts: 183
  • Thank you received: 1
  • Karma: 0
question type:equation
{round((Q1.valueNAOK+Q2.valueNAOK+Q3.valueNAOK+Q4.valueNAOK)/count(Q1,Q2,Q3,Q4),2)}
because i set relevance of Q1,Q2,Q3,Q4.this equation question value should be :
if user relevant questions is Q1,Q2,Q4,should be of (Q1+Q2+Q4)/3.
if user relevant questions is Q1,Q3,should be of (Q1+Q4)/2.
BUT IN RESPONSE TABLE, THE VALUE IS 0.

what's the problem?
The administrator has disabled public write access.

cannot get the equation value in EM! 3 months 5 days ago #109975

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6331
  • Thank you received: 817
  • Karma: 243
Q1.NAOK : .NAOK - same as .code, but can be part of calculations or lists even if irrelevant .

Else give error
The administrator has disabled public write access.

cannot get the equation value in EM! 3 months 5 days ago #109977

  • iscar
  • iscar's Avatar
  • OFFLINE
  • Gold Lime
  • Posts: 183
  • Thank you received: 1
  • Karma: 0
i use Q1.valueNAOK,even Q1 is irrelevant, the Q1.valueNAOK is 0
it means no there's no error in Q1.valueNAOK.
and i check the response, Q1 is answered, the problem is {round((Q1.valueNAOK+Q2.valueNAOK+Q3.valueNAOK+Q4.valueNAOK)/count(Q1,Q2,Q3,Q4),2)} is 0.
The administrator has disabled public write access.

cannot get the equation value in EM! 3 months 5 days ago #109982

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6331
  • Thank you received: 817
  • Karma: 243
BUT count(Q1,Q2,Q3,Q4) does error.

If you trye with (Q1.NAOK,Q2.NAOK,Q3.NAOK,Q4.NAOK) ?
The administrator has disabled public write access.

cannot get the equation value in EM! 3 months 5 days ago #109989

  • iscar
  • iscar's Avatar
  • OFFLINE
  • Gold Lime
  • Posts: 183
  • Thank you received: 1
  • Karma: 0
as to count, q1 equal to q1.NAOK
i recreat the survey, this problem disappear.
i think the problem is about
Error executing query in dbExecuteAssoc:CDbCommand failed to execute the SQL statement: SQLSTATE[42S22]: Column not found: 1054 Unknown column
but i have no idea what cause this problem.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.146 seconds
Donation Image