Conditions/Relevance Equations based on Attributes having something in them

More
2 years 7 months ago #119343 by TDynamics
TDynamics created the topic: Conditions/Relevance Equations based on Attributes having something in them
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)?

Please Log in to join the conversation.

More
2 years 7 months ago #119344 by TDynamics
TDynamics replied the topic: Conditions/Relevance Equations based on Attributes having something in them
Nevermind. My guess was correct.

Please Log in to join the conversation.

More
2 years 7 months ago #119367 by DenisChenu
DenisChenu replied the topic: Conditions/Relevance Equations based on Attributes having something in them
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 (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
2 years 7 months ago #119429 by TDynamics
TDynamics replied the topic: Conditions/Relevance Equations based on Attributes having something in them
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?

Please Log in to join the conversation.

More
2 years 7 months ago #119438 by DenisChenu
DenisChenu replied the topic: Conditions/Relevance Equations based on Attributes having something in them
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 (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!