Welcome to the LimeSurvey Community Forum

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

Prefill only one row in array

  • hamiltonand
  • hamiltonand's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 10 months ago #169632 by hamiltonand
Prefill only one row in array was created by hamiltonand
Hello!

I'm trying to prefill de value of just one row of an array with the value of a previous array. I use version 2.05+ Build 140109.

The previous array have just one row. I want to use it to assign it to the last row (of 6) of a new array question. I have been reading some posts, but they do not fit exactly with my needs :(

Anyone could help me?

Thanks!!

Javier.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 10 months ago - 5 years 10 months ago #169637 by tpartner
Replied by tpartner on topic Prefill only one row in array
You can use the Expression Manager assignment operator - manual.limesurvey.org/Expression_Manager..._Assignment_Operator

Place a hidden (via CSS) equation question directly after the second array (in the same group).

Place something like this in that equation question:

Code:
{Q2_SQ006 = if(is_empty(Q2_SQ006), Q1_SQ001, Q2_SQ006)}

Sample survey attached:

File Attachment:

File Name: limesurvey...7384.lss
File Size:21 KB



Oh, and, you should definitely update your LimeSurvey version.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 5 years 10 months ago by tpartner.
The topic has been locked.
  • hamiltonand
  • hamiltonand's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 10 months ago #169644 by hamiltonand
Replied by hamiltonand on topic Prefill only one row in array
Thank you Tony!!

That's exactly what I need!!

And sure, I will update to the latest version as soon as possible!! :)

Javier.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose