Welcome to the LimeSurvey Community Forum

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

Confirmation email attachment and conditional filter limeSurvey V5

More
1 year 11 months ago #227329 by ephe
Please help us help you and fill where relevant:
Your LimeSurvey version: 5.3.9+220411
Own server or LimeSurvey hosting: Own server

==================
Hello,

I am having a problem with handling attachments in a survey confirmation email and using the conditional attachment filter.
My survey sends a confirmation email to the participant when they have completed the survey but I can't condition the sending of one (or more) attachments to this email based on the answer given to a question in the form.
For example, the last question in my survey has the number "7896", the code "INS" and it is a multiple choice question with 3 choices coded as "A1", "A2" and "A3".
I would like that if the participant answers "A1", he receives in his confirmation email, the desired attachment otherwise he receives nothing. I tried the filters :
  •     ((INS.NAOK == "A1")), with or without parenthesis, with or without braces, single quote or double quote
  •     ((qid7896.NAOK == "A1")), with or without parenthesis, with or without braces, single quote or double quote
But no matter how the filter is written and how the participant answers, he ALWAYS receives the attachment. I even tried putting "0" to the conditional filter which should mean that the condition is always false so it never sends the attachment... The participant still receives the attachment. I specify that the same condition (in this case ((INS.NAOK == "A1")) works perfectly to make a question appear in the form so the logic is the right one.
I should also point out that I had already used this feature and it worked very well. But we were in version 3 of LimeSurvey, today we are on version 5 (as I said before) maybe it is related?

Is this feature buggy with this version? If so, obviously it should be fixed but who should I contact? If not, how can I write correctly the conditional filter so that my attachment(s) will be attached to my confirmation email only when certain response conditions are met?

Kind regards to all of you.

Please Log in to join the conversation.

More
1 year 11 months ago - 1 year 11 months ago #227330 by davebostockgmail
That is not how you refer to a multiple choice in a expression ...

for your first option it should read {if(INS_A1.NAOK=="Y",Do something,Do something else)}
Last edit: 1 year 11 months ago by davebostockgmail.

Please Log in to join the conversation.

More
1 year 11 months ago #227332 by ephe
Thank's for your reply but it doens't work no more.
I tested it in the confirmation mail content (and with the conditional filter of attachments) and the expression script validator doens't accept your one (refer to the first attachment of this post).
I build "my" conditionnal expression with the limeSurvey conditional filter builder and as i first said, it worked when i used it to display or not a next question.

Or i want to use the feature of conditionnal filter of attachments (and i used perfectly with the limeSurvey V3). The one you can see on my second attachment of this post

Please Log in to join the conversation.

More
1 year 11 months ago - 1 year 11 months ago #227333 by davebostockgmail
Without seeing an LSS file I cannot say what you have done ... here is it working as you describe for both a multiple choice question and a single choice question in the confirmation email.


 
Last edit: 1 year 11 months ago by davebostockgmail.

Please Log in to join the conversation.

More
1 year 11 months ago #227334 by ephe
Thx, i haven't even think about an .lss file to help undestand my issue...I've just test yours and sadly it's not the behave i want.I repost your lss file with few adjustements to help you to understand what i want to use.  
Attachments:

Please Log in to join the conversation.

More
1 year 11 months ago #227336 by davebostockgmail
I am not seeing an issue with this ... I am using Version 5.3.9

Sorry 
Attachments:

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 11 months ago #227337 by Joffm
But the second line is exactly what you have to use
 

But reading this

and using the conditional attachment filter.

you want to conditionally "attach" something?
This is different from all images you showed.

And in into the confirmation mails of your survey there was no additional code inserted

Please, tell exactly what you want to do.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

More
1 year 11 months ago #227341 by ephe
I'm sorry but this was exactly what i said at the very beginning of my first post :

I am having a problem with handling attachments in a survey confirmation email and using the conditional attachment filter.
My survey sends a confirmation email to the participant when they have completed the survey but I can't condition the sending of one (or more) attachments to this email based on the answer given to a question in the form.

I want to conditionally "attach" something, yes ! With the feature provide by limeSurvey i already used previously with the v3 of LimeSurvey :

I should also point out that I had already used this feature and it worked very well. But we were in version 3 of LimeSurvey, today we are on version 5 (as I said before) maybe it is related?

And i show this in the second image posted with my response to th first answer ( 2022-04-14_08h46_31.png ).

You can see what i want and what doesn't work (conditionnal filters for attachment mail) with the "mytest.lss" i posted earlier.

Please Log in to join the conversation.

More
1 year 11 months ago - 1 year 11 months ago #227342 by ephe
bad edit, sorry...
Last edit: 1 year 11 months ago by ephe.

Please Log in to join the conversation.

More
1 year 11 months ago #227343 by ephe

I am not seeing an issue with this ... I am using Version 5.3.9

Sorry 
 
Conditionnal attachment worked for you with my "mytest.lss" ?
If you answered the A1, a confirmation mail was sent to you with only one attachment (Myfile1.txt) and If you answered the A2, a confirmation mail was sent to you with only one attachment (Myfile2.txt) ?

You haven't receive a confirmation mail with all of the attachment saved in the confirmation mail feature ?

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose