Welcome to the LimeSurvey Community Forum

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

Sintax Parametric END URL depends from Questions

  • caspani
  • caspani's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 5 months ago #233974 by caspani
Hi,

I put in my end page these two code

{if(G27Q54.NAOK=='Y',{G27Q55},{G27Q56})} --> NOT WORK

{if(G27Q54.NAOK=='Y','pippo','pluto')} --> WORK

What is wrong in the sintax in the first one please?

thanks - giorgio



Please help us help you and fill where relevant:
Your LimeSurvey version: [see right hand bottom of your LimeSurvey admin screen]
Own server or LimeSurvey hosting:
Survey theme/template:
==================
(Write here your question/remark)

Please Log in to join the conversation.

More
1 year 5 months ago #233978 by jelo
Not sure why you have additional {} around the variables, which are not needed and cause normally an syntax error.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 5 months ago #233984 by holch
To add to Jelo's answer:

Take out the {} around the question codes. { indicates that a equation starts. But at this position, you are already within an equation.

This should work:
Code:
{if(G27Q54.NAOK=='Y',G27Q55,G27Q56)}

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

Please Log in to join the conversation.

  • caspani
  • caspani's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 5 months ago #234007 by caspani
Hi,

thanks for your reply.

I tried to insert your code: {if(G27Q54.NAOK=='Y',G27Q55,G27Q56)}

But the result is blank.

I have created two questions (type equation) for G27Q55 and G27Q56 in which there images and texts

Should I have to add anything to stamp the value of the equation in the final page ?

thank you

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 5 months ago #234008 by holch
without knowing the exact structure of your survey it is impossible to know why the question codes don't give you a results.

Provide us with an LSS-Export of just the elevant questions and we can have a look.

1. copy your survey
2. delete all unnecessary questions for this issue
3. (optional); Anonymize your questions (change the question text and answer options if you don't want us to know them)
4. export as LSS file
5. Upload it here in the thread

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

Please Log in to join the conversation.

  • caspani
  • caspani's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 5 months ago #234030 by caspani
HI Holch,

here you are... in attachment...

Thank you so much

giorgio

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 5 months ago - 1 year 5 months ago #234032 by Joffm
Hi,

calendly.com/creaimprese/cciaamodena?nam...&email={G12Q48_SQ003 }

This is not an equation, but a "text display". Equations should not contain anything else as the function. It displayed, but you can't use it later.
As equation (eq1) something like this
{' calendly.com/creaimprese/cciaamodena?nam...email='+G12Q48_SQ003 }
you may do this later
{if(G12Q48_SQ001=="Y",'<h4 align="justify"> <a href="'+eq1+'" target="_blank">Your button</a>','Do something else')}

The same here

<h4 align="justify"><a href="{G12Q49}" target="_blank"><img alt="" src="/upload/surveys/437577/images/bottone-prenota-verde.png" style="width: 232px; height: 65px;" /></a><br /> </h4>


Meaning: you better use an IF- construct in your end message,
exactly as you did here (condition, if TRUE-> Text 1, if FALSE-> Text 2)
{if(G27Q54.NAOK=='Y','pippo','pluto')} --> WORK
like this.
Consider nested quotes. And beware of some strange ideas of the editor.
Better to use the source code editor, not the inline HTML editor.

{if(G27Q54.NAOK=='Y','
<h4 align="justify"><a href="'+G12Q49+'" target="_blank"><img alt="" src="/upload/surveys/437577/images/bottone-prenota-verde.png" style="width: 232px; height: 65px;" /></a><br /> </h4>','<h4 align="justify"><br /><br />Hai dubbi su quanto emerso o vuoi ulteriori specifiche. Contattaci a <a href="mailto:genesi@mo.camcom.it">genesi@mo.camcom.it. ')}

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 1 year 5 months ago by Joffm.

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose