Re: Multipe Conditions in DVD (518 Views)
Reply
Regular Advisor
Christian Henrich
Posts: 106
Registered: ‎08-16-2006
Message 1 of 5 (771 Views)
Accepted Solution

Multipe Conditions in DVD

Hi to all frontend developers,

 

it need to know if its possible to add more than one DVD condition do a visible condition.

 

For example: "[$a]=true and [$b]= false"

 

If its possible, what is the correct Syntax?

 

Regards from Germany

Please use plain text.
Honored Contributor
John Stagaman
Posts: 3,131
Registered: ‎07-13-2007
Message 2 of 5 (765 Views)

Re: Multipe Conditions in DVD

[ Edited ]

For an AND condition:

[a]=true & [b]=true

 

For an OR condition:

[field1]="name" | [field1]="nom"

 

If you combine AND and OR statements, the order of operations will group them--you cannot use parens.

[a]=true & [b]=true & [field1]="name" | [field1]="nom"

would evaluate as:

[a]=true & [b]=true & [field1]="name"       OR        [field1]="nom"

 

The sample format in SM called dep.g has some examples of DVD controls and expressions

----------------------------------------------------
Kudos - what, where, how, and why
Want Good Answers? Ask Good Questions...
Please use plain text.
Occasional Collector
anmar
Posts: 1
Registered: ‎02-15-2012
Message 3 of 5 (541 Views)

Re: Multipe Conditions in DVD

Hi John

I have tested the below and it works however when I change the equal "=" to not equal to"<>" it does not work for multiple conidtions (however for a single condition it works) . Below is an example of what does not work:

 

[field1]<>"name" | [field1]<>"nom"

 

appreciate your feedback

 

Regards

Please use plain text.
Honored Contributor
Vadim Gorda
Posts: 5,491
Registered: ‎11-10-2008
Message 4 of 5 (534 Views)

Re: Multipe Conditions in DVD

Hello,

Maybe I am mistaken now but I think that you can achieve the same with [field1]<>"name" & [field1]<>"nom"

 

like & instead of | (or)

Please use plain text.
Trusted Contributor
tprovin
Posts: 229
Registered: ‎11-05-2009
Message 5 of 5 (518 Views)

Re: Multipe Conditions in DVD

[field1]<>"name" & [field1]<>"nom" is not the same as [field1]<>"name" | [field1]<>"nom" and will not produce the same result.

AND: will only return true if all inputs are true

OR: will return true if at least one input is true

I am not sure why the <> expressions aren't working for you, but I have been able to get it to work.
Thanks,

Tim
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation