Question Type Multiple Short Text is prefilled with an undesired space

More
3 years 5 months ago #107676 by Bart01
Bart01 created the topic: Question Type Multiple Short Text is prefilled with an undesired space
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.

Please Log in to join the conversation.

More
3 years 5 months ago #107681 by first
first replied the topic: Question Type Multiple Short Text is prefilled with an undesired space
Can you please a test lss showing that problem that you are facing?

Survey Designer and Programmer

Please Log in to join the conversation.

More
3 years 5 months ago #107682 by Bart01
Bart01 replied the topic: Question Type Multiple Short Text is prefilled with an undesired space
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,

Please Log in to join the conversation.

More
3 years 5 months ago #107683 by first
first replied the topic: Question Type Multiple Short Text is prefilled with an undesired space
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.

Survey Designer and Programmer

Please Log in to join the conversation.

More
3 years 5 months ago #107685 by DenisChenu
DenisChenu replied the topic: Question Type Multiple Short Text is prefilled with an undesired space

Bart wrote: Q-106, Q-107

LimeSUrvey version ?

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
3 years 5 months ago #107690 by Bart01
Bart01 replied the topic: Question Type Multiple Short Text is prefilled with an undesired space
2.05+

Please Log in to join the conversation.

More
3 years 5 months ago #107692 by Bart01
Bart01 replied the topic: Question Type Multiple Short Text is prefilled with an undesired space
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:

Please Log in to join the conversation.

More
3 years 5 months ago #107699 by first
first replied the topic: Question Type Multiple Short Text is prefilled with an undesired space
Please click source when you update equations in an equation type questions.
Please import attached lss

Survey Designer and Programmer
Attachments:

Please Log in to join the conversation.

More
3 years 5 months ago #107707 by Bart01
Bart01 replied the topic: Question Type Multiple Short Text is prefilled with an undesired space
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.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now