Welcome, Guest
Username: Password: Remember me

TOPIC: Question Type Multiple Short Text is prefilled with an undesired space

Question Type Multiple Short Text is prefilled with an undesired space 4 months 3 weeks ago #107676

  • Bart
  • Bart's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 35
  • Karma: 0
This is what i try to do.

Prior question was NOT mandatory.
So:
ANSWER1 is answered, ANSWER2 and ANSWER3 both empty.
I test this with "is_empty", and indeed ANSWER1 is filled, ANSWER2 and ANSWER3 are empty.

With the answers I am filling a Question Type Multiple Short Text. Further on I have a follow-up question with an array filter on this Multiple Short Text Question.
Subquestion is:
SQ001 {ANSWER1}
SQ002 {ANSWER2}
SQ003 {ANSWER3}

So far, so good.
I want to use the Multiple Text Question as an array filter, so I fill the answer options as well.
I tried filling it with:
{ANSWER1} {ANSWER2} {ANSWER3}
later with{ANSWER1.NAOK} {ANSWER2.NAOK} {ANSWER3.NAOK}
with {if(!is_empty(ANSWER1.NAOK),ANSWER1.NAOK,'')}, etc
I even used the trim function.

The problem is that LimeSurvey as adding a space to the answer.
This space is causing the NAOK to be NOT EMPTY, and my follow-up question thus shows all answers,
including ANSWER2 and ANSWER3 as a empty line.
(If I manually use the backspace, then the space is deleted, causing the NAOK to be empty.)

The !is_empty is working correctly, since the line is not empty, but holding the undesired space.
The administrator has disabled public write access.

Question Type Multiple Short Text is prefilled with an undesired space 4 months 3 weeks ago #107681

  • trivender
  • trivender's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 142
  • Thank you received: 6
  • Karma: 6
Can you please a test lss showing that problem that you are facing?
Trivender Singh
Survey Designer and Programmer
"I always suggest to have a group by group display layout and create a seprate group for each question. This will be extra work but you will get flexiblity to create your question by using more than more lime survey question types."
The administrator has disabled public write access.

Question Type Multiple Short Text is prefilled with an undesired space 4 months 3 weeks ago #107682

  • Bart
  • Bart's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 35
  • Karma: 0
The involved questions are:
Starting at question group G-8
the three fields are:
Q0105, Q-106, Q-107, concmatrix1, concmatrix2, concmatrix3

Q108, the multiple short texts Question, with both subquestions and answer options
Q114, finally, is the question which should skip empty answers, based upon the filter array from Q108,

hope this helps,
The administrator has disabled public write access.

Question Type Multiple Short Text is prefilled with an undesired space 4 months 3 weeks ago #107683

  • trivender
  • trivender's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 142
  • Thank you received: 6
  • Karma: 6
Hi Bart.

1)Please create this situation in a test survey.
2)Export the test survey in lss format and attach it here on forums.
3)I will import that survey in my test environment and then try to help you.
Trivender Singh
Survey Designer and Programmer
"I always suggest to have a group by group display layout and create a seprate group for each question. This will be extra work but you will get flexiblity to create your question by using more than more lime survey question types."
The administrator has disabled public write access.

Question Type Multiple Short Text is prefilled with an undesired space 4 months 3 weeks ago #107685

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6309
  • Thank you received: 808
  • Karma: 241
Bart wrote:
Q-106, Q-107
LimeSUrvey version ?
The administrator has disabled public write access.

Question Type Multiple Short Text is prefilled with an undesired space 4 months 3 weeks ago #107690

  • Bart
  • Bart's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 35
  • Karma: 0
2.05+
The administrator has disabled public write access.

Question Type Multiple Short Text is prefilled with an undesired space 4 months 3 weeks ago #107692

  • Bart
  • Bart's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 35
  • Karma: 0
O.k.

I copied the survey and removed all irrelevant questions.
The logic is:
1. give 1-3 competitors
2. rank the competitors (now including "uw eigen organisatie" (i.e. your own organisation)
3. conc1nu, conc2nu, conc3nu, conc4nu are calculated
4. concmatrix1, concmatrix2, concmatrix are calculated
this is the ranking of the competitors, so without "your own organisation"/ "uw eigen organisatie"
5. concmatrix is the Question Type Multiple Short Text
in the final version it is invisible, and just serves the goal of stripping empty competitors
6. conczwakte: this is the question where it all comes down to, where the
array filter from concmatrix should do the work(( ! is_empty(concmatrix_SQ002.NAOK)))


Hope this helps
Attachments:
The administrator has disabled public write access.

Question Type Multiple Short Text is prefilled with an undesired space 4 months 3 weeks ago #107699

  • trivender
  • trivender's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 142
  • Thank you received: 6
  • Karma: 6
Please click source when you update equations in an equation type questions.
Please import attached lss
Attachments:
Trivender Singh
Survey Designer and Programmer
"I always suggest to have a group by group display layout and create a seprate group for each question. This will be extra work but you will get flexiblity to create your question by using more than more lime survey question types."
The administrator has disabled public write access.

Question Type Multiple Short Text is prefilled with an undesired space 4 months 3 weeks ago #107707

  • Bart
  • Bart's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 35
  • Karma: 0
Trivender,

thx! Solved.

I imported your lss file,and tested, worked fine.

Than I did a file comparison between my lss file and your lss file.

And indeed, in source modus the changes appear clearly, so that was easy to adjust.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.123 seconds
Donation Image