Set file upload maxfiles value from another question

More
5 months 2 weeks ago #168233 by ptorterolo
ptorterolo created the topic: Set file upload maxfiles value from another question
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
Attachments:

Please Log in or Create an account to join the conversation.

More
5 months 2 weeks ago - 5 months 2 weeks ago #168234 by holch
holch replied the topic: Set file upload maxfiles value from another question
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'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds
Last Edit: 5 months 2 weeks ago by holch.

Please Log in or Create an account to join the conversation.

More
5 months 2 weeks ago #168235 by davebostockgmail
davebostockgmail replied the 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?

Please Log in or Create an account to join the conversation.

More
5 months 2 weeks ago #168238 by holch
holch replied the topic: Set file upload maxfiles value from another question
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'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in or Create an account to join the conversation.

More
5 months 2 weeks ago #168240 by davebostockgmail
davebostockgmail replied the topic: Set file upload maxfiles value from another question
Ahh right .. thanks

Please Log in or Create an account to join the conversation.

More
5 months 2 weeks ago #168243 by ptorterolo
ptorterolo replied the topic: Set file upload maxfiles value from another question
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.

Please Log in or Create an account to join the conversation.

More
5 months 2 weeks ago #168252 by holch
holch replied the topic: Set file upload maxfiles value from another question
Can you export a little test survey with only the relevant questions included as a LSS file and upload it here?

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in or Create an account to join the conversation.

More
5 months 2 weeks ago #168257 by ptorterolo
ptorterolo replied the topic: Set file upload maxfiles value from another question
Sure!
Attachments:

Please Log in or Create an account to join the conversation.

More
5 months 2 weeks ago #168276 by holch
holch replied the topic: Set file upload maxfiles value from another question
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'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds
Attachments:

Please Log in or Create an account to join the conversation.

More
5 months 2 weeks ago #168277 by Joffm
Joffm replied the topic: Set file upload maxfiles value from another question
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

Please Log in or Create an account to join the conversation.

More
5 months 2 weeks ago #168337 by ptorterolo
ptorterolo replied the topic: Set file upload maxfiles value from another question
According to the limesurvey docs, the File Upload Question allow EM.
Attachments:

Please Log in or Create an account to join the conversation.

More
5 months 2 weeks ago #168338 by ptorterolo
ptorterolo replied the topic: Set file upload maxfiles value from another question
Yes, I could do that, but I was trying to make it dynamic.
Thanks

Please Log in or Create an account to join the conversation.

More
5 months 2 weeks ago #168339 by holch
holch replied the topic: Set file upload maxfiles value from another question
Well, than this is either a mistake in the manual or this is a bug. Because my Limesurvey only accepts numbers and nothing else.

Does your EM code save? I can't even input letter.

I guess this means that you need to create a bug report.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!