Welcome, Guest
Username: Password: Remember me

TOPIC: condition 'not null' or 'not blank'

condition 'not null' or 'not blank' 3 years 6 months ago #49893

  • jmenard
  • jmenard's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 3
  • Karma: 0
I'm hopping to set up a question that only appears if the previous short text question is 'not null' or 'not blank'.

I was hopping to setup the comparison operator equals 'not null' since my only criteria is to have an answer in the test field.

Can this be done?
Last Edit: 3 years 6 months ago by jmenard.
The administrator has disabled public write access.

Re:condition 'not null' or 'not blank' 3 years 6 months ago #49894

  • jmenard
  • jmenard's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 3
  • Karma: 0
I was able to answer my own question.

I'm using the following regular expressions:


Word count

The following restricts the number of words allowed to a minimum of 1 and a maximum of 200
/^[-\w]+(?:\W+[-\w]+){0,199}\W*$/


TX
The administrator has disabled public write access.

Re:condition 'not null' or 'not blank' 3 years 6 months ago #50529

  • jmenard
  • jmenard's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 3
  • Karma: 0
Oups I was wrong.

So It dose not work... Bad testing. It was hiding the question in all conditions.


Anyone???
The administrator has disabled public write access.

Re:condition 'not null' or 'not blank' 3 years 6 months ago #50535

  • mdekker
  • mdekker's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 340
  • Thank you received: 68
  • Karma: 38
www.unix.com/shell-programming-scripting...ular-expression.html

Did you read that? they talk about 'not empty' regular expressions. Try some and report back what worked for you or add it to the manual.

The minumum width in the manual looks promising to me... did you try that?
/^.{1,}$/

At least one char is needed this way.
---
Menno Dekker
The administrator has disabled public write access.

Re:condition 'not null' or 'not blank' 3 years 6 months ago #50563

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5279
  • Thank you received: 289
  • Karma: 246
Isn't it possible to set a constant value for comparison? Something like ""?

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Re:condition 'not null' or 'not blank' 2 years 10 months ago #61890

  • waitz
  • waitz's Avatar
  • OFFLINE
  • Gold Lime
  • Posts: 170
  • Thank you received: 1
  • Karma: 3
I am struggling with this one....

I need to create a rule that makes the recipient see:
-Question 1 if token x is blank
-Question 2 if token x is not blank

I tried to see what happened when I added /^.{1,}$/ as a regular expression, but it did not have any affect at all. I searched in the documentation, but it didn't make me wiser.

Anyone know how I can use reg.exp to the 2 scenarios above?
Version 1.91+ Build 11232 | PHP 5.3.9 | MySQL 5.1.56 |
Last Edit: 2 years 10 months ago by waitz.
The administrator has disabled public write access.

[SOLVED] Re:condition 'not null' or 'not blank' 2 years 10 months ago #61968

  • waitz
  • waitz's Avatar
  • OFFLINE
  • Gold Lime
  • Posts: 170
  • Thank you received: 1
  • Karma: 3
Mazi wrote:
Isn't it possible to set a constant value for comparison? Something like ""?
It took a while before I understood what you meant. By setting 'equal to' or 'not equal to', choose constant and not entering anything, the condition is understood as 'No answer'

Great!
Version 1.91+ Build 11232 | PHP 5.3.9 | MySQL 5.1.56 |
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.126 seconds
Donation Image