Welcome to the LimeSurvey Community Forum

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

Set file upload maxfiles value from another question

  • ptorterolo
  • ptorterolo's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 11 months ago #168233 by ptorterolo
Dear Limesurvey Forum

I have a survey where I'm asking how many people are in a group (list question from 3 to 8, code P01). In the next question, I need to request an individual resume for each person in the group, so the maxfiles value in the file upload question (P02), will need to be the same as the previous response.

If I use P01.shown as value in the maxfile input, it shows me the correct number in the label, but it doesn't work.

Using the chrome inspector I can see that the maxfiles value is 0.

Could you help me?
Thanks
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 11 months ago - 5 years 11 months ago #168234 by holch
I think .shown gives you probably a string, not a number. What about using the question code for the number? This should give you an integer and LS should be able to work with it.

So if you just use P01 (assuming that the answer codes are 1, 2, 3, 4, 5 and not something like A1, A2, A3, A4) and see what happens.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Last edit: 5 years 11 months ago by holch.
The topic has been locked.
More
5 years 11 months ago #168235 by davebostockgmail
Replied by davebostockgmail on topic Set file upload maxfiles value from another question
Wouldn't P01.value return the integer if it is a numeric? and if it is a dropdown then the code which would correspond to the text value but as a number?
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 11 months ago #168238 by holch
P01.value is the assessment value. So it only works if the assessment values are set.

I think the easiest way is to put the answer codes the same as the number that is shown.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
More
5 years 11 months ago #168240 by davebostockgmail
Replied by davebostockgmail on topic Set file upload maxfiles value from another question
Ahh right .. thanks
The topic has been locked.
  • ptorterolo
  • ptorterolo's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 11 months ago #168243 by ptorterolo
I tested it and it didn't work. I changed the answer codes to 1,2,3...and it's the same. In the front you'll see the correct label, but when you're going to upload files, the maxfiles values is 0.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 11 months ago #168252 by holch
Can you export a little test survey with only the relevant questions included as a LSS file and upload it here?

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • ptorterolo
  • ptorterolo's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 11 months ago #168257 by ptorterolo
Sure!
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 11 months ago #168276 by holch
Seems like this field does not allow Expressions. Have a look at my screenshot: it actually requires that you put numbers or go up and down with the little arrows.

There was no EM code stores in the field in your survey anyway.


I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 11 months ago #168277 by Joffm
As a simple workaround just create as many fileupload questions as the maximum number is.

Display them with relevance equations.

E.g. fileupload2, if P01>1, fileupload3, if P01>2, ...

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • ptorterolo
  • ptorterolo's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 11 months ago #168337 by ptorterolo
According to the limesurvey docs, the File Upload Question allow EM.
Attachments:
The topic has been locked.
  • ptorterolo
  • ptorterolo's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 11 months ago #168338 by ptorterolo
Yes, I could do that, but I was trying to make it dynamic.
Thanks
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose