Welcome to the LimeSurvey Community Forum

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

Conditions/Relevance Equations based on Attributes having something in them

  • TDynamics
  • TDynamics's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 11 months ago #119343 by TDynamics
Hello All,

Today I am trying to figure out if it is possible to have a condition based on a token attribute having content.

I am populating the attributes for people with a child over 18. If they don't have a child over 18, then I don't want the question to show up.

Is there a way to have the relevance equation be something along the lines of !is_empty(TOKEN:ATTRIBUTE_1)?
The topic has been locked.
  • TDynamics
  • TDynamics's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 11 months ago #119344 by TDynamics
Nevermind. My guess was correct.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 11 months ago #119367 by DenisChenu
And if you "import" the token : this is best:

!is_empty(trim(TOKEN:ATTRIBUTE_1))

;)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • TDynamics
  • TDynamics's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 10 months ago #119429 by TDynamics
Thank you for your help.

Not to be OCD, but why does it make a difference with the (trim(TOKEN:ATTRIBUTE_1)) vs not having the trim?
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 10 months ago #119438 by DenisChenu
Because, when some "user" use some spreadsheet tool, space are easily added to a "empty" column :)

Then when importing : there was a space. Triming remove this space.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose