- Posts: 5
- Thank you received: 0
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
- Topic Author
- Offline
- New Member
Less
More
5 years 11 months ago #168233
by ptorterolo
Set file upload maxfiles value from another question was created 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
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:
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11655
- Thank you received: 2740
5 years 11 months ago - 5 years 11 months ago #168234
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on 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.
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.
- davebostockgmail
- Offline
- Elite Member
Less
More
- Posts: 166
- Thank you received: 26
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11655
- Thank you received: 2740
5 years 11 months ago #168238
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on 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 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.
- davebostockgmail
- Offline
- Elite Member
Less
More
- Posts: 166
- Thank you received: 26
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
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
5 years 11 months ago #168243
by ptorterolo
Replied by ptorterolo on 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.
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11655
- Thank you received: 2740
5 years 11 months ago #168252
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on 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 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
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
5 years 11 months ago #168257
by ptorterolo
Replied by ptorterolo on topic Set file upload maxfiles value from another question
Sure!
Attachments:
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11655
- Thank you received: 2740
5 years 11 months ago #168276
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on 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.
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.
Attachments:
The topic has been locked.
- Joffm
- Away
- LimeSurvey Community Team
Less
More
- Posts: 12909
- Thank you received: 3975
5 years 11 months ago #168277
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on 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
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
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
5 years 11 months ago #168337
by ptorterolo
Replied by ptorterolo on topic Set file upload maxfiles value from another question
According to the limesurvey docs, the File Upload Question allow EM.
Attachments:
The topic has been locked.
- ptorterolo
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
5 years 11 months ago #168338
by ptorterolo
Replied by ptorterolo on topic Set file upload maxfiles value from another question
Yes, I could do that, but I was trying to make it dynamic.
Thanks
Thanks
The topic has been locked.