Welcome, Guest
Username: Password: Remember me

TOPIC: Referencing filtered array values with Expression Manager

Referencing filtered array values with Expression Manager 2 months 2 weeks ago #111426

  • duvemyster
  • duvemyster's Avatar
  • OFFLINE
  • Gold Donor
  • Posts: 17
  • Thank you received: 4
  • Karma: 1
QFA is a filtered array, for which rows R1, R2, and R3 may or may not exist.

Where C1 is the first column, I'd like to utilize QFA_R1_C1, QFA_R2_C1, and QFA_R3_C1 in Expression Manager equations. However, these variable are only defined if their row is displayed.

Creating a hidden equation type question for each such value can achieve variables that are always defined whether or not their rows exist (i.e., Code: FORR3C1 | Question:{QFA_R3_C1} | and then utilize {FORR3C1} instead of {QFA_R3_C1} in subsequent EM formulas.)

But this can get to be a lot of expression type questions for larger arrays.

Question: Is there another way to ensure that {QFA_R3_C1} is always defined whether or not row R3 is filtered?
Last Edit: 2 months 2 weeks ago by duvemyster.
The administrator has disabled public write access.

Referencing filtered array values with Expression Manager 2 months 2 weeks ago #111439

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4281
  • Thank you received: 807
  • Karma: 370
Try:
{QFA_R3_C1.NAOK}
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
The following user(s) said Thank You: duvemyster

Referencing filtered array values with Expression Manager 2 months 2 weeks ago #111457

  • duvemyster
  • duvemyster's Avatar
  • OFFLINE
  • Gold Donor
  • Posts: 17
  • Thank you received: 4
  • Karma: 1
Awesome. Thank you. Yes, that works.
The administrator has disabled public write access.

Referencing filtered array values with Expression Manager 2 months 2 weeks ago #111461

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4281
  • Thank you received: 807
  • Karma: 370
No problem.

For the benefit of others, NAOK stands for "not applicable okay" and should always be used for variables from questions that may not be shown due to relevance or conditions.


.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Referencing filtered array values with Expression Manager 2 months 1 week ago #111690

  • david2013
  • david2013's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 26
  • Thank you received: 3
  • Karma: 2
Should we always use qcode.NAOK ? Is it there any situation that we should only use qcode (no .naok)?
The administrator has disabled public write access.

Referencing filtered array values with Expression Manager 2 months 1 week ago #111712

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5333
  • Thank you received: 296
  • Karma: 249
It makes sense to always use .NAOK. I am not aware of any drawbacks.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
The following user(s) said Thank You: david2013
Moderators: ITEd
Time to create page: 0.163 seconds
Donation Image