AND Function: Difference between revisions

From Planfix
Jump to: navigation, search
No edit summary
No edit summary
Line 1: Line 1:
{{#seo:
|title=AND Function
|titlemode=append
|keywords=planfix, Function, AND, reports
|description=AND Function
}}
This function returns the Boolean value "true" if both conditions are true. It is usually used in conjunction with the [[IF Function]].  
This function returns the Boolean value "true" if both conditions are true. It is usually used in conjunction with the [[IF Function]].  




''Format:''
== Format ==
*'''AND(condition1;condition2)'''


*'''AND(condition1;condition2)'''
where:
*'''condition1 / condition2''' - logical expressions using >, <, =, >=, <=, !=, other functions, report column values or fields
 
 
== Examples № 1 ==
<div style="display: block; padding: 1em; margin: 0 0 10px; font-size: 13px; line-height: 1.65; color: black; word-wrap: break-word; background-color: #f9f9f9; border: 1px solid #ddd; border-radius: 4px;">IF(AND(D="Text in column";С>100500);"Good";"Bad")</div>




''where:''
== Important ==
*condition1 / condition2 - logical expressions using >, <, =, >=, <=, !=, other functions, report column values or fields
*'''The condition''' can be an arithmetic expression. If the result of this expression is a non-zero number, the condition is considered fulfilled. If the result of the expression is zero, the condition is not fulfilled.
*When checking values in custom [[Checkbox | checkbox fields]], you should use 1 and 0 in [[Reports | reports]] and Yes / No in [[Calculated data tag fields | data tag calculated fields]]
*Function works only with two arguments.


 
== Alternative use ==
In formulas, it is represented by two consecutive ampersand symbols — '''&&''''


''Examples:''
== Example № 2 ==
<div style="display: block; padding: 1em; margin: 0 0 10px; font-size: 13px; line-height: 1.65; color: black; word-wrap: break-word; background-color: #f9f9f9; border: 1px solid #ddd; border-radius: 4px;">
%%$<span style="color:green">ЕСЛИ</span>(<br>
<span style="color:blue"><nowiki>{{Task.Notification}}</nowiki></span>=0<br>
<span style="color:red">&& </span><span style="color:blue"><nowiki>{{Task.Application through the form}}</nowiki></span>=1<br>
<span style="color:red">&& </span><span style="color:blue"><nowiki>{{Task.Who are you?}}</nowiki></span>="Physical person"<br>
<span style="color:red">&& </span><span style="color:blue"><nowiki>{{Task.Choose the correct answer}}</nowiki></span>="Calculation.Legal Entity ."<br>
)$%%<br>
Некорректное значение поля «Выбрать готовый ответ» для типа заказчика «Физическое лицо»<br>
%%$<span style="color:green">КОНЕЦБЛОКА</span>$%%


IF(AND(D="Column text";C>100500);"Good";"Bad")


'''The construction must be added in one line without spaces and line breaks:'''


''Notes:''
<nowiki>%%$IF({{Task."Disable field 07. Notification"}}=0&&{{Task.Application through the form}}=1&&{{Task.Who are you?}}="Physical person"&&{{Task.Choose the correct answer}}="Calculation. ЮЛ.")$%%Некорректное значение поля «Выбрать готовый ответ» для типа заказчика «Физическое лицо»%%$КОНЕЦБЛОКА$%%</nowiki>
*the condition can be an arithmetic expression. If the result of this expression is a non-zero number, then the condition is considered to be fulfilled. If the result of the expression is zero, then the condition is considered not fulfilled.
</div>
*when checking values in custom [[Checkbox | checkbox fields]], you should use 1 and 0 in [[Reports | reports]] and Yes / No in [[Calculated data tag fields | data tag calculated fields]]


 


== Go To ==
== Go To ==

Revision as of 12:05, 29 March 2024

This function returns the Boolean value "true" if both conditions are true. It is usually used in conjunction with the IF Function.


Format

  • AND(condition1;condition2)

where:

  • condition1 / condition2 - logical expressions using >, <, =, >=, <=, !=, other functions, report column values or fields

 

Examples № 1

IF(AND(D="Text in column";С>100500);"Good";"Bad")


Important

  • The condition can be an arithmetic expression. If the result of this expression is a non-zero number, the condition is considered fulfilled. If the result of the expression is zero, the condition is not fulfilled.
  • When checking values in custom checkbox fields, you should use 1 and 0 in reports and Yes / No in data tag calculated fields
  • Function works only with two arguments.

Alternative use

In formulas, it is represented by two consecutive ampersand symbols — &&'

Example № 2

%%$ЕСЛИ(
{{Task.Notification}}=0
&& {{Task.Application through the form}}=1
&& {{Task.Who are you?}}="Physical person"
&& {{Task.Choose the correct answer}}="Calculation.Legal Entity ."
)$%%
Некорректное значение поля «Выбрать готовый ответ» для типа заказчика «Физическое лицо»
%%$КОНЕЦБЛОКА$%%


The construction must be added in one line without spaces and line breaks:

%%$IF({{Task."Disable field 07. Notification"}}=0&&{{Task.Application through the form}}=1&&{{Task.Who are you?}}="Physical person"&&{{Task.Choose the correct answer}}="Calculation. ЮЛ.")$%%Некорректное значение поля «Выбрать готовый ответ» для типа заказчика «Физическое лицо»%%$КОНЕЦБЛОКА$%%


Go To