563 lines
83 KiB
HTML
563 lines
83 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
|
||
<head>
|
||
<title>EQL syntax</title>
|
||
<meta name="generator" content="Help+Manual" />
|
||
<meta name="keywords" content="" />
|
||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<meta name="description" content="To find an app item by its parameters, its properties are assigned certain values in an EQL query. The structure of an EQL query follows the rules: " />
|
||
<meta name="picture" content="" />
|
||
<meta property="og:type" content="website" />
|
||
<meta property="og:title" content="Full documentation for BRIX365 platform. Low-code developer guide. User guide. Admin guide. Developer guide." />
|
||
<meta property="og:url" content="https://brix365.com/en/help" />
|
||
<meta property="og:image" content="" />
|
||
<link rel="icon" href="favicon.png" type="image/png" />
|
||
|
||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet" />
|
||
<link rel="stylesheet" href="./jquery-ui.min.css" />
|
||
<link rel="stylesheet" href="default.css" />
|
||
<link rel="stylesheet" href="./search-yandex.css" />
|
||
<link rel="stylesheet" href="./article.css" />
|
||
<link rel="stylesheet" href="./glossary.css" />
|
||
<link rel="stylesheet" href="./theme.css" />
|
||
<script type="text/javascript" src="jquery.js"></script>
|
||
<script type="text/javascript" src="helpman_settings.js"></script>
|
||
<script type="text/javascript" src="helpman_topicinit.js"></script>
|
||
|
||
<script type="text/javascript" src="highlight.js"></script>
|
||
<script type="text/javascript">
|
||
$(document).ready(function(){highlight();});
|
||
</script>
|
||
</head>
|
||
|
||
<body>
|
||
|
||
<script>!function(e,t,c,n,r,a,m){e.ym=e.ym||function(){(e.ym.a=e.ym.a||[]).push(arguments)},e.ym.l=1*new Date;for(var s=0;s<document.scripts.length;s++)if(document.scripts[s].src===n)return;a=t.createElement(c),m=t.getElementsByTagName(c)[0],a.async=1,a.src=n,m.parentNode.insertBefore(a,m)}(window,document,"script","https://mc.yandex.ru/metrika/tag.js"),ym(83179930,"init",{clickmap:!0,trackLinks:!0,accurateTrackBounce:!0,webvisor:!0})</script><noscript><div><img alt=""src=https://mc.yandex.ru/watch/83179930 style=position:absolute;left:-9999px></div></noscript>
|
||
|
||
<header class="header elma-365">
|
||
<div class="container">
|
||
<a class="header__logo" href="https://brix365.com/en/help">
|
||
<img src="./logo-en.svg" alt="header logo">
|
||
</a>
|
||
<!-- <div class="hero__search-form" id="search-panel">
|
||
<form class="search-form" onsubmit="ym(83180416,'reachGoal','poisk')">
|
||
<label class="search-form__label">
|
||
<span id="reset-search" class="search__icon"></span>
|
||
<input class="search-form__input" type="text">
|
||
</label>
|
||
<input class="search-form__submit" type="submit" value="Submit">
|
||
</form>
|
||
</div> -->
|
||
|
||
<div class="hero__search-form" id="search-panel"> <form class="search-form"> <label class="search-form__label"> <span id="reset-search" class="search__icon"></span> <input class="search-form__input" type="text"> </label> <input class="search-form__submit" type="submit" value="Submit"> </form> </div>
|
||
<div class="hero__search">
|
||
<a href="#" id="search-icon" class="hero__search-icon">
|
||
<img src="search-icon-white.svg" alt="search string">
|
||
</a>
|
||
<a href="#" id="side-menu-icon" class="hero__side-icon">
|
||
<img src="side_menu.svg" alt="side menu">
|
||
</a>
|
||
</div>
|
||
<div class="header__navi">
|
||
|
||
<ul class="header__list"><li><span class="solution-select"><span class="solution-select__selected"></span><svg width="7" height="4" viewBox="0 0 7 4" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L3.5 3.5L6 1" stroke="white" stroke-linecap="round" stroke-linejoin="round"/></svg><ul class="solution-select__list"><li><a class="project-link" href="https://brix365.com/en/help/platform/get-trial.html">Platform</a></li><li><a class="project-link" href="https://brix365.com/en/help/ecm/ecm-functions.html">ECM</a></li><li><a class="project-link" href="https://brix365.com/en/help/crm/crm_overview.html">CRM</a></li><li><a class="project-link" href="https://brix365.com/en/help/service/service-functions.html">Service</a></li><li><a class="project-link" href="https://brix365.com/en/help/projects/projects-functions.html">Projects</a></li><li><a class="project-link" href="https://brix365.com/en/help/business_solutions/-elma365-store.html">Business Solutions</a></li></ul></span></li><li><a href="https://api.brix365.com/en/" target="_blank">API</a></li><li><a href="https://tssdk.brix365.com/" target="_blank">SDK</a></li></ul>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
|
||
</header>
|
||
|
||
|
||
|
||
|
||
<main class="main container">
|
||
|
||
<aside class="sidebar" id="sidebar">
|
||
<div class="sidebar__header">
|
||
<a class="header__logo" href="https://brix365.com/en/help">
|
||
<img src="./logo-light-en.svg">
|
||
</a>
|
||
<span class="sidebar__close elma-365-close" id="close"></span>
|
||
</div>
|
||
<div class="sidebar__wrapper" id="side-menu">
|
||
|
||
</div>
|
||
</aside>
|
||
|
||
<article class="article" id="article">
|
||
<div class="article-inner">
|
||
<div class="content">
|
||
<header class="article__header">
|
||
<div class="article__bread" style="display:flex; gap:10px;">
|
||
<span id="subcategory" class="search-res__item-category search-res__item-category_subcategory subcategory article__badge"></span>
|
||
|
||
<div class="topic__breadcrumbs">
|
||
<p>Low-code designer > <a href="360006963072.html">App</a> > <a href="eql365-search.html">Search queries in EQL365 </a> / EQL syntax</p>
|
||
</div>
|
||
|
||
</div>
|
||
<div class="topic__title"><h1 class="p_Heading1"><span class="f_Heading1">EQL syntax</span></h1>
|
||
</div>
|
||
|
||
</header>
|
||
<section class="article__content">
|
||
<div class="scroll-top-inner">
|
||
<a href="#h1-article" class="scroll-top"></a>
|
||
</div>
|
||
<!-- Placeholder for topic body. -->
|
||
<p style="line-height: 1.28; margin: 0 0 11px 0;">To find an app item by its parameters, its properties are assigned certain values in an EQL query. The structure of an EQL query follows the rules: </p>
|
||
<ol style="list-style-type:decimal">
|
||
<li value="1" style="line-height: 1.28; margin-top: 0; margin-right: 0; margin-bottom: 11px;">To access app properties, the codes assigned to them when they were created are used. The variable code is required to be specified in square brackets: <code><b>[property_name]</b></code>. </li><li value="2" style="line-height: 1.28; margin-top: 0; margin-right: 0; margin-bottom: 11px;">The <a href="eql-syntax.html#operations" class="topiclink">search operation</a> is specified. Standard mathematical signs or keywords of the EQL365 language are used. </li><li value="3" style="line-height: 1.28; margin-top: 0; margin-right: 0; margin-bottom: 11px;">The value you are looking for is specified according to the <a href="eql-syntax.html#assign-value" class="topiclink">rules for assigning values</a> for properties of different types. </li><li value="4" style="line-height: 1.28; margin-top: 0; margin-right: 0; margin-bottom: 11px;">You can use <a href="eql-syntax.html#functions" class="topiclink">functions</a> to assign a value or calculate it in a query, for example, to set a specific date or search for a current employee in the <span style="font-weight: bold;">Users</span> property.</li><li value="5" style="line-height: 1.28; margin-top: 0; margin-right: 0; margin-bottom: 11px;">To assign values to properties within a query, you can <a href="eql-syntax.html#create_parameters" class="topiclink">create a parameter</a> and reference it multiple times. The parameter value is specified after the query is composed, in the fields that are automatically added to the search window.</li><li value="6" style="line-height: 1.28; margin-top: 0; margin-right: 0; margin-bottom: 11px;">To search by several conditions, <a href="eql-syntax.html#logical-operators" class="topiclink">logical operators</a> are added to the query. You can also specify the condition that will be checked first. </li><li value="7" style="line-height: 1.28; margin-top: 0; margin-right: 0; margin-bottom: 11px;">You can use <a href="eql-syntax.html#subquery" class="topiclink">subqueries</a> to make complex data selections. Within a subquery, you can access the properties of any app in the system.</li><li value="8" style="line-height: 1.28; margin-top: 0; margin-right: 0; margin-bottom: 11px;">All components of the query should be separated by spaces.</li></ol>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало примера</span></p>
|
||
<p class="p_Normal">Examples of searching for items using EQL queries</p>
|
||
<ol style="list-style-type:decimal">
|
||
<li value="1" class="p_Normal"><span style="font-weight: bold;">[company_name] = 'WoodsBricks' or [company_name] like 'Woods'</span>. Search for <span style="font-weight: bold;">Company</span> app items in which the <span style="font-weight: bold;">Name</span> field matches the first specified value completely or contains the second.</li><li value="2" class="p_Normal"><span style="font-weight: bold;">[__createdAt] = Datetime(2023, 1) and [price] > 400</span>. Search for records of the <span style="font-weight: bold;">Orders</span> app that have January 2023 in the <span style="font-weight: bold;">Created</span> field and have a value greater than 400 in the <span style="font-weight: bold;">Price</span> field.</li><li value="3" class="p_Normal"><span style="font-weight: bold;">[contract] in (from [documents.contracts] select [__id] where [total] > 10000)</span>. Search for records of the <span style="font-weight: bold;">Contractors</span> app, where the <span style="font-weight: bold;">Contract</span> field specifies the app item with the amount exceeding 10,000.</li></ol>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец примера</span></p>
|
||
<h2 class="p_Heading2"><a id="assign-value" class="hmanchor"></a><span class="f_Heading2">Assigning values to properties of different types</span></h2>
|
||
<p style="line-height: 1.28; margin: 0 0 11px 0;">For correct processing of an EQL query, all its components should be separated by spaces. When writing a query, you can use the autocomplete option. To bring up the dropdown menu with available properties, functions, and operators, press<span style="font-weight: bold;"> Ctrl + Space</span>.</p>
|
||
<p style="line-height: 1.28; margin: 0 0 11px 0;">For the correct processing of an EQL query, values for different <a href="360009707032.html" class="topiclink">types of properties</a> used in the context of the apps are assigned in specific ways. See the table below for more details:</p>
|
||
<div style="text-align: left; text-indent: 0; line-height: 1.28; padding: 0 0 0 0; margin: 0 0 11px 0;"><table style="border:none; border-spacing:0;">
|
||
<tr>
|
||
<td style="vertical-align:top; width:192px; padding:0; border:none"><p style="line-height: 1.20;"><span style="font-weight: bold;">Data type</span></p>
|
||
</td>
|
||
<td style="vertical-align:top; width:451px; padding:0; border:none"><p style="line-height: 1.20;"><span style="font-weight: bold;">Rule for assigning a value</span></p>
|
||
</td>
|
||
<td style="vertical-align:top; width:417px; padding:0; border:none"><p style="line-height: 1.20;"><span style="font-weight: bold;">Example</span></p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="vertical-align:top; width:192px; padding:0; border:none"><p style="line-height: 1.20;"><span style="font-weight: bold;">String</span></p>
|
||
</td>
|
||
<td style="vertical-align:top; width:451px; padding:0; border:none"><p style="line-height: 1.20;">Assigned with a string in single quotes.</p>
|
||
</td>
|
||
<td style="vertical-align:top; width:417px; padding:0; border:none"><ol style="list-style-type:decimal">
|
||
<li value="1" style="line-height: 1.20; margin-top: 0; margin-right: 0; margin-bottom: 0;"><span style="font-weight: bold;">[authors_name] like 'Alex'</span>. The <span style="font-weight: bold;">Author’s name</span> field contains the value <span style="font-weight: bold;">Alex</span>.</li><li value="2" style="line-height: 1.20; margin-top: 0; margin-right: 0; margin-bottom: 0;"><span style="font-weight: bold;">[product] in ('fan', 'freezer')</span>. The <span style="font-weight: bold;">Product</span> field contains one of the specified values.</li><li value="3" style="line-height: 1.20; margin-top: 0; margin-right: 0; margin-bottom: 0;"><span style="font-weight: bold;">[authors_name] is null</span>. The author’s name is not provided.</li></ol>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="vertical-align:top; width:192px; padding:0; border:none"><p style="line-height: 1.20;"><span style="font-weight: bold;">Number, Money</span></p>
|
||
</td>
|
||
<td style="vertical-align:top; width:451px; padding:0; border:none"><p style="line-height: 1.20;">The value of the searched number without quotes is used.</p>
|
||
<p style="line-height: 1.20;">Fractional numbers are separated by a period.</p>
|
||
<p style="line-height: 1.20;"><span style="font-size: 13px; color: #000000;"> </span></p>
|
||
</td>
|
||
<td style="vertical-align:top; width:417px; padding:0; border:none"><ol style="list-style-type:decimal">
|
||
<li value="1" style="line-height: 1.20; margin-top: 0; margin-right: 0; margin-bottom: 0;"><span style="font-weight: bold;">[size] < 5.5</span>. The <span style="font-weight: bold;">Size</span> field specifies a value less than 5.5 meters.</li><li value="2" style="line-height: 1.20; margin-top: 0; margin-right: 0; margin-bottom: 0;"><span style="font-weight: bold;">[price] >= 5000</span>. The value of the <span style="font-weight: bold;">Price</span> field is greater than or equal to 5,000.</li></ol>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="vertical-align:top; width:192px; padding:0; border:none"><p style="line-height: 1.20;"><span style="font-weight: bold;">Yes/No switch</span></p>
|
||
</td>
|
||
<td style="vertical-align:top; width:451px; padding:0; border:none"><p style="line-height: 1.20;">Assigned with the value <code><b>true</b></code> without quotes.</p>
|
||
</td>
|
||
<td style="vertical-align:top; width:417px; padding:0; border:none"><ol style="list-style-type:decimal">
|
||
<li value="1" style="line-height: 1.20;"><span style="font-weight: bold;">[prepayment] = true</span>. <span style="font-weight: bold;">Yes</span> is selected in the <span style="font-weight: bold;">Prepayment</span> field.</li><li value="2" style="line-height: 1.20;"><span style="font-weight: bold;">[prepayment] <> true</span>. No value is specified in the <span style="font-weight: bold;">Prepayment</span> field or <span style="font-weight: bold;">No</span> is selected.</li><li value="3" style="line-height: 1.20;"><span style="font-weight: bold;">[prepayment] is null</span>. The <span style="font-weight: bold;">Prepayment</span> field is empty.</li></ol>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="vertical-align:top; width:192px; padding:0; border:none"><p style="line-height: 1.20;"><span style="font-weight: bold;">Date/Time</span></p>
|
||
</td>
|
||
<td style="vertical-align:top; width:451px; padding:0; border:none"><p style="line-height: 1.20;">It can be assigned in two ways:</p>
|
||
<ul style="list-style-type:disc">
|
||
<li style="line-height: 1.20; margin-top: 0; margin-right: 0; margin-bottom: 0;">With the <a href="eql-syntax.html#functions" class="topiclink">Datetime()</a> or <a href="eql-syntax.html#functions" class="topiclink">Time()</a> function. The components are separated by commas.</li><li style="line-height: 1.20; margin-top: 0; margin-right: 0; margin-bottom: 0;">With a string in single quotes. The dates are separated with a dash. </li></ul>
|
||
<p style="line-height: 1.20;">You can use a shortened spelling of a part of the date, and you can also specify the time, including indicating the time zone.</p>
|
||
<p style="line-height: 1.20;"><span style="font-size: 13px; color: #000000;"> </span></p>
|
||
<p style="line-height: 1.28; margin: 0 0 11px 0;">A period relative to the current date is calculated using the function <a href="eql-syntax.html#relative-date" class="topiclink">RelativeDatetime('start', 'end')</a>. The start and end of the period are indicated in parentheses. Parameters are enclosed in single quotes and separated by commas.</p>
|
||
</td>
|
||
<td style="vertical-align:top; width:417px; padding:0; border:none"><ol style="list-style-type:decimal">
|
||
<li value="1" style="line-height: 1.20; margin-top: 0; margin-right: 0; margin-bottom: 0;"><span style="font-weight: bold;">[close_date] > Datetime(2023, 1, 31, 12)</span>.</li><li value="2" style="line-height: 1.20; margin-top: 0; margin-right: 0; margin-bottom: 0;"><span style="font-weight: bold;">[close_date] > '2023-01-31-12'</span>.</li></ol>
|
||
<p style="line-height: 1.20; margin: 0 0 0 1px;">Both queries are used to find a <span style="font-weight: bold;">Closed on</span> field with a value later than January 31, 2023 afternoon.</p>
|
||
<ol style="list-style-type:decimal">
|
||
<li value="3" style="line-height: 1.20; margin-top: 0; margin-right: 0; margin-bottom: 0;"><span style="font-weight: bold;">[close_date] < '2023-01-31T12:30:00'</span>. Closed earlier than January 31, 2023, at 12:30 PM.</li><li value="4" style="line-height: 1.20; margin-top: 0; margin-right: 0; margin-bottom: 0;"><span style="font-weight: bold;">[close_date] < '2023-01-31T12:30+09:00'</span>. Closed with a value earlier than January 31, 2023, at 12:30 PM, taking into account the time zone (UTC+09:00).</li><li value="5" style="line-height: 1.28; margin-top: 0; margin-right: 0; margin-bottom: 11px;"><span style="font-weight: bold;">[__createdAt] IN RelativeDatetime('-1m','0d')</span>. Find all items created between the first day of the past month and the current date.</li></ol>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="vertical-align:top; width:192px; padding:0; border:none"><p style="line-height: 1.20;"><span style="font-weight: bold;">Category</span></p>
|
||
</td>
|
||
<td style="vertical-align:top; width:451px; padding:0; border:none"><p style="line-height: 1.20;">Assigned with the category code in single quotes.</p>
|
||
</td>
|
||
<td style="vertical-align:top; width:417px; padding:0; border:none"><p style="line-height: 1.20;"><span style="font-weight: bold;">[payment] in ('half', 'full')</span>. The <span style="font-weight: bold;">Partial </span>and <span style="font-weight: bold;">Full prepayment </span>are selected in the <span style="font-weight: bold;">Payment </span>field. </p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="vertical-align:top; width:192px; padding:0; border:none"><p style="line-height: 1.20;"><span style="font-weight: bold;">Phone number </span></p>
|
||
</td>
|
||
<td style="vertical-align:top; width:451px; padding:0; border:none"><p style="line-height: 1.20;">Assigned with a string in single quotes.</p>
|
||
</td>
|
||
<td style="vertical-align:top; width:417px; padding:0; border:none"><p style="line-height: 1.20;"><span style="font-weight: bold;">[phone] = '+71234567890'</span>. The <span style="font-weight: bold;">Phone number</span> field has the specified value</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="vertical-align:top; width:192px; padding:0; border:none"><p style="line-height: 1.20;"><span style="font-weight: bold;">Email address</span></p>
|
||
</td>
|
||
<td style="vertical-align:top; width:451px; padding:0; border:none"><p style="line-height: 1.20;">Assigned with a string in single quotes.</p>
|
||
</td>
|
||
<td style="vertical-align:top; width:417px; padding:0; border:none"><p style="line-height: 1.20;"><span style="font-weight: bold;">[email] = 'admin@example.com'</span>. The <span style="font-weight: bold;">Email address</span> field has the specified value.</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="vertical-align:top; width:192px; padding:0; border:none"><p style="line-height: 1.20;"><span style="font-weight: bold;">Full Name</span></p>
|
||
</td>
|
||
<td style="vertical-align:top; width:451px; padding:0; border:none"><p style="line-height: 1.20;">Assigned with a string in single quotes.</p>
|
||
</td>
|
||
<td style="vertical-align:top; width:417px; padding:0; border:none"><p style="line-height: 1.20;"><span style="font-weight: bold;">[contact] like 'John'</span>. The <span style="font-weight: bold;">Contact person</span> field has the specified value. </p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="vertical-align:top; width:192px; padding:0; border:none"><p style="line-height: 1.20;"><span style="font-weight: bold;">Users</span></p>
|
||
</td>
|
||
<td style="vertical-align:top; width:451px; padding:0; border:none"><p style="line-height: 1.28; margin: 0 0 11px 0;">Assigned with a string representation of the identifier in single quotes. To find the user’s identifier, go to <span style="font-weight: bold;">Company > Employees</span>, select the required page, and copy the value indicated in the page URL.</p>
|
||
</td>
|
||
<td style="vertical-align:top; width:417px; padding:0; border:none"><p style="line-height: 1.20;"><span style="font-weight: bold;">[responsible] = '95806fe5-f8e8-460c-b2be-ce607068726c'</span>. A certain user is specified in the <span style="font-weight: bold;">Assigned to</span><span style="font-size: 13px; font-weight: bold;"> </span>field.</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="vertical-align:top; width:192px; padding:0; border:none"><p style="line-height: 1.20;"><span style="font-weight: bold;">App</span></p>
|
||
</td>
|
||
<td style="vertical-align:top; width:451px; padding:0; border:none"><ol style="list-style-type:decimal">
|
||
<li value="1" style="line-height: 1.28; margin-top: 0; margin-right: 0; margin-bottom: 11px;">Assigned with a string representation of the identifier in single quotes without spaces.</li></ol>
|
||
<p style="line-height: 1.28; margin: 0 0 11px 0;">To find the item’s identifier, go to the required app<span style="color: #202122; background-color: #ffffff;">’s</span> page, select a record, and copy the value indicated in the page URL.</p>
|
||
<ol style="list-style-type:decimal">
|
||
<li value="2" class="p_Normal">Search by selecting data by criteria. It is specified using a subquery with the <a href="eql-syntax.html#subquery" class="topiclink">Select_From_Where</a> type function.</li></ol>
|
||
</td>
|
||
<td style="vertical-align:top; width:417px; padding:0; border:none"><ol style="list-style-type:decimal">
|
||
<li value="1" style="line-height: 1.20;"><span style="font-weight: bold;">[app] = '018a1c61-c2b9-7701-86ab-d8b39a143465'</span>. An item of the current app with the specified identifier is selected in the field.</li><li value="2" class="p_Normal"><span style="font-weight: bold;">[order] in (select [__id] from [clients] where [__name] like 'Hall')</span>.<span style="font-weight: bold;"> </span>Search for an order from the <span style="font-weight: bold;">Customers</span> app, where the company’s name contains the specified value.</li></ol>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="vertical-align:top; width:192px; padding:0; border:none"><p style="line-height: 1.20;"><span style="font-weight: bold;">Arbitrary app</span></p>
|
||
</td>
|
||
<td style="vertical-align:top; width:451px; padding:0; border:none"><p class="p_Normal">The search is performed by the item’s code in two ways:</p>
|
||
<ol style="list-style-type:decimal">
|
||
<li value="1" class="p_Normal">It is set by the identifier of a specific item:</li></ol>
|
||
<ul style="list-style-type:disc">
|
||
<li style="line-height: 1.20; margin-top: 0; margin-right: 0; margin-bottom: 0;">With the <a href="eql-syntax.html#refitem" class="topiclink">Refitem()</a> function. The workspace code, app code, and item identifier are entered in parentheses, separated by commas. Each value is separated by single quotes.</li><li style="line-height: 1.20; margin-top: 0; margin-right: 0; margin-bottom: 0;">With a string in single quotes. The path to the item is specified without spaces, separated by a colon.</li></ul>
|
||
<ol style="list-style-type:decimal">
|
||
<li value="2" class="p_Normal">A selection of data based on criteria.<span style="font-family: 'Times New Roman',Times,Georgia,serif;"> </span>It is specified using a subquery with the <a href="eql-syntax.html#subquery" class="topiclink">Select_From_Where</a> type function.</li></ol>
|
||
</td>
|
||
<td style="vertical-align:top; width:417px; padding:0; border:none"><ol style="list-style-type:decimal">
|
||
<li value="1" class="p_Normal">A query to search for items that have a specific record in the <span style="font-weight: bold;">Contract</span> field from the <span style="font-weight: bold;">Customers</span><span style="font-weight: bold;"> </span><span style="font-weight: bold;">></span><span style="font-weight: bold;"> </span><span style="font-weight: bold;">Contracts</span> workspace:</li></ol>
|
||
<ul style="list-style-type:disc">
|
||
<li style="line-height: 1.20; margin-top: 0; margin-right: 0; margin-bottom: 0;"><span style="font-weight: bold;">[contract] = Refitem('clients', 'contracts', '1415381a-1197-11ee-be56-0242ac120002')</span>.</li><li style="line-height: 1.20; margin-top: 0; margin-right: 0; margin-bottom: 0;"><span style="font-weight: bold;">[client] = 'clients:contracts:1415381a-1197-11ee-be56-0242ac120002'</span>.</li></ul>
|
||
<ol style="list-style-type:decimal">
|
||
<li value="2" class="p_Normal">A query to search for items that have a specific record in the <span style="font-weight: bold;">Contract</span> field from the <span style="font-weight: bold;">Customers</span><span style="font-weight: bold;"> </span><span style="font-weight: bold;">></span><span style="font-weight: bold;"> </span><span style="font-weight: bold;">Contracts</span> workspace, where an order with an amount of more than 100 dollars is specified:</li></ol>
|
||
<p class="p_Normal"><span style="font-weight: bold; background-color: #ffffff;">[contract] in (select [__id] from [clients.orders] where [total] > 100)</span><span style="background-color: #ffffff;">.</span></p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="vertical-align:top; width:192px; padding:0; border:none"><p style="line-height: 1.20;"><span style="font-weight: bold;">Status</span></p>
|
||
</td>
|
||
<td style="vertical-align:top; width:451px; padding:0; border:none"><p style="line-height: 1.20;">Assigned with a numeric representation of the status identifier.</p>
|
||
</td>
|
||
<td style="vertical-align:top; width:417px; padding:0; border:none"><p style="text-indent: -1px; line-height: 1.20; margin: 0 0 0 1px;"><span style="font-weight: bold;">[__status] = 1</span>. The item is assigned the first status.</p>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
<p style="line-height: 1.28; margin: 0 0 11px 0;">You can search for items with no values in their fields. For this purpose, the <a href="eql-syntax.html#key-words" class="topiclink">Is null or Is empty</a> operation is used in the query. Exceptions are <span style="font-weight: bold;">Phone number</span> and <span style="font-weight: bold;">Email address</span> properties.</p>
|
||
<h2 class="p_Heading2"><a id="create_parameters" class="hmanchor"></a><span class="f_Heading2">Creating parameters in an EQL query and and using them</span></h2>
|
||
<p style="line-height: 1.28; margin: 0 0 11px 0;">To specify the desired value of a property, you can create a new parameter within the query. This parameter can be referenced multiple times in the query. The parameter value is set after composing the query, making it dynamic and changeable with each search.</p>
|
||
<p style="line-height: 1.28; margin: 0 0 11px 0;">A parameter is created using the @ symbol followed by an arbitrary name in English characters. After adding the parameter, an additional field with its name appears in the search window. Once the query is composed, you can specify the parameter value in the additional field and run the search.</p>
|
||
<p style="line-height: 1.28; margin: 0 0 11px 0;"><img alt="eql_parameters_brix_01" width="856" height="546" style="margin:0;width:856px;height:546px;border:none" src="eql_parameters_brix_01.png"/></p>
|
||
<p style="line-height: 1.28; margin: 0 0 11px 0;">If values are not specified in the additional fields, an expression using custom parameters can be <a href="360009669952.html#filters" class="topiclink">saved as a filter</a>. This allows employees to apply the composed EQL query, define property values through the parameter, and search for various information.</p>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало примера</span></p>
|
||
<p style="line-height: 1.28; margin: 0 0 11px 0;">Example of a query</p>
|
||
<p class="p_Normal"><span style="font-weight: bold;">[__createdBy] = @User AND [budget] = @Amount</span>. In the query, the <span style="font-weight: bold;">Author</span> and <span style="font-weight: bold;">Budget</span> fields from the app are set using parameters. The employee can enter specific values for them, specifying any user and amount, and search for items with different authors and budget.</p>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец примера</span></p>
|
||
<h2 class="p_Heading2"><a id="operations" class="hmanchor"></a><span class="f_Heading2">Search operations</span></h2>
|
||
<p style="line-height: 1.28; margin: 0 0 11px 0;">Search operations are used to assign a value in an EQL query. They can be indicated by mathematical signs or keywords of the EQL365 language.</p>
|
||
<h3 class="p_Heading3"><a id="symbols" class="hmanchor"></a><span class="f_Heading3">Operations using symbols</span></h3>
|
||
<p style="line-height: 1.28; margin: 0 0 11px 0;">These operations follow a similar principle. The first operand is a property code. A certain value is assigned to it. The second operand is a given value, another property, or a function. Such operations include:</p>
|
||
<ol style="list-style-type:upper-roman">
|
||
<li value="1" style="line-height: 1.28; margin-top: 0; margin-right: 0; margin-bottom: 11px;"><span style="font-weight: bold;">Equal</span> is represented by the symbol <span style="font-weight: bold;">=</span>.</li></ol>
|
||
<p style="line-height: 1.28; margin: 0 0 11px 34px;">This operation is used to check for an exact match. It is not recommended to use it with properties of <span style="font-weight: bold;">Date/Time</span> type, because an exact match to the field value is unlikely.</p>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало примера</span></p>
|
||
<p class="p_Normal">Examples of queries</p>
|
||
<ol style="list-style-type:decimal">
|
||
<li value="1" class="p_Normal"><span style="font-weight: bold;">[client] = 'Smith'</span>. Search for a client with the specified name.</li><li value="2" class="p_Normal"><span style="font-weight: bold;">[payment] = [budget]</span>. Search for <span style="font-weight: bold;">Payment </span>fields that match the <span style="font-weight: bold;">Budget </span>field.</li><li value="3" class="p_Normal"><span style="font-weight: bold;">[responsible] = CurrentUser()</span>. Search for items with the current user as the responsible user. </li></ol>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец примера</span></p>
|
||
<ol style="list-style-type:upper-roman" start="2">
|
||
<li value="2" style="line-height: 1.28; margin-top: 0; margin-right: 0; margin-bottom: 11px;"><span style="font-weight: bold;">Not equal</span> is represented by the symbol <span style="font-weight: bold;"><></span>. </li></ol>
|
||
<p style="line-height: 1.28; margin: 0 0 11px 34px;">This operation is used to check the absence of an exact match.</p>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало примера</span></p>
|
||
<p class="p_Normal">Examples of queries</p>
|
||
<ol style="list-style-type:decimal">
|
||
<li value="1" class="p_Normal"><span style="font-weight: bold;">[product] <> 'Equipment'</span>. Search for orders where the <span style="font-weight: bold;">Product</span> field does not contain the specified value.</li><li value="2" class="p_Normal"><span style="font-weight: bold;">[payment] <> [budget]</span>. Search for orders where the <span style="font-weight: bold;">Payment</span> field does not match the <span style="font-weight: bold;">Budget</span> field.</li><li value="3" class="p_Normal"><span style="font-weight: bold;">[responsible] <> CurrentUser()</span>. Search for items that do not specify the current user as responsible. </li></ol>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец примера</span></p>
|
||
<ol style="list-style-type:upper-roman" start="3">
|
||
<li value="3" style="line-height: 1.28; margin-top: 0; margin-right: 0; margin-bottom: 11px;"><span style="font-weight: bold;">Greater than</span> is represented by the symbol <span style="font-weight: bold;">></span>.</li></ol>
|
||
<p style="line-height: 1.28; margin: 0 0 11px 34px;">This operation is used to for a strict comparison of greater values.</p>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало примера</span></p>
|
||
<p class="p_Normal">Examples of queries</p>
|
||
<ol style="list-style-type:decimal">
|
||
<li value="1" class="p_Normal"><span style="font-weight: bold;">[price] > 10000</span>. Search for orders with the cost exceeding the specified value.</li><li value="2" class="p_Normal"><span style="font-weight: bold;">[payment] > [budget]</span>. Search for orders where the value in the <span style="font-weight: bold;">Payment </span>field is greater than the one in the <span style="font-weight: bold;">Budget </span>field.</li><li value="3" class="p_Normal"><span style="font-weight: bold;">[shipping_date] > Datetime(2023, 1, 31, 12)</span>. Search for orders with a shipping date later than the specified date and 12 PM time.</li></ol>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец примера</span></p>
|
||
<ol style="list-style-type:upper-roman" start="4">
|
||
<li value="4" style="line-height: 1.28; margin-top: 0; margin-right: 0; margin-bottom: 11px;"><span style="font-weight: bold;">Greater than or equal to</span> is represented by the symbol <span style="font-weight: bold;">>=</span>.</li></ol>
|
||
<p style="line-height: 1.28; margin: 0 0 11px 34px;">This is a non-strict comparison operator.</p>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало примера</span></p>
|
||
<p class="p_Normal">Examples of queries</p>
|
||
<ol style="list-style-type:decimal">
|
||
<li value="1" class="p_Normal"><span style="font-weight: bold;">[price] >= 10000</span>. Search for orders with the cost exceeding or equal to the specified value.</li><li value="2" class="p_Normal"><span style="font-weight: bold;">[payment] >= [budget]</span>. Search for orders where the value in the <span style="font-weight: bold;">Payment</span> field is greater than the one in the <span style="font-weight: bold;">Budget</span> field or is equal to it.</li><li value="3" class="p_Normal"><span style="font-weight: bold;">[shipping_date] >= Datetime('Today')</span>. Search for orders with shipping on or after 00:00:00 on the current date.</li></ol>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец примера</span></p>
|
||
<ol style="list-style-type:upper-roman" start="5">
|
||
<li value="5" style="line-height: 1.28; margin-top: 0; margin-right: 0; margin-bottom: 11px;"><span style="font-weight: bold;">Less than</span> is represented by the symbol <span style="font-weight: bold;"><</span>.</li></ol>
|
||
<p style="line-height: 1.28; margin: 0 0 11px 34px;">This a strict comparison operator.</p>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало примера</span></p>
|
||
<p class="p_Normal">Examples of queries</p>
|
||
<ol style="list-style-type:decimal">
|
||
<li value="1" class="p_Normal"><span style="font-weight: bold;">[price] < 10000</span>. Search for orders with a cost lower than the specified value.</li><li value="2" class="p_Normal"><span style="font-weight: bold;">[payment] < [budget]</span>. Search for orders where the value in the <span style="font-weight: bold;">Payment </span>field is less than one in the <span style="font-weight: bold;">Budget </span>field.</li><li value="3" class="p_Normal"><span style="font-weight: bold;">[shipping_date] < Datetime('Today')</span>. Search for orders with shipping earlier that 00:00:00 on the current date.</li></ol>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец примера</span></p>
|
||
<ol style="list-style-type:upper-roman" start="6">
|
||
<li value="6" style="line-height: 1.28; margin-top: 0; margin-right: 0; margin-bottom: 11px;"><span style="font-weight: bold;">Less than or equal to</span> is represented by the symbol <span style="font-weight: bold;"><=</span>.</li></ol>
|
||
<p style="line-height: 1.28; margin: 0 0 11px 34px;">This is a non-strict comparison operator.</p>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало примера</span></p>
|
||
<p class="p_Normal">Examples of queries</p>
|
||
<ol style="list-style-type:decimal">
|
||
<li value="1" class="p_Normal"><span style="font-weight: bold;">[price] <= 10000</span>. Search for orders with a cost exceeding or equal to the specified value.</li><li value="2" class="p_Normal"><span style="font-weight: bold;">[payment] <= [budget]</span>. Search for orders where the value in the <span style="font-weight: bold;">Payment </span>field is greater than one in the <span style="font-weight: bold;">Budget </span>field or is equal to it.</li><li value="3" class="p_Normal"><span style="font-weight: bold;">[shipping_date] <= Datetime('Today')</span>. Search for orders with shipping on or earlier than 00:00:00 on the current date.</li></ol>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец примера</span></p>
|
||
<h3 class="p_Heading3"><a id="key-words" class="hmanchor"></a><span class="f_Heading3">Operations with EQL365 keywords</span></h3>
|
||
<ol style="list-style-type:upper-roman">
|
||
<li value="1" style="line-height: 1.28; margin-top: 0; margin-right: 0; margin-bottom: 11px;"><span style="font-weight: bold;">Partial string match</span> is represented by the value <code><b>LIKE</b></code>.</li></ol>
|
||
<p style="line-height: 1.28; margin: 0 0 11px 34px;">The <code><b>LIKE</b></code> operation is used to find a partial text match regardless of the case. It allows you to find occurrences of a specified value in any part of a string, returning all strings containing the searched fragment.</p>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало примера</span></p>
|
||
<p style="text-indent: -24px; line-height: 1.28; margin: 0 0 11px 22px;">Example</p>
|
||
<p style="text-indent: -24px; line-height: 1.28; margin: 0 0 11px 22px;"><span style="font-size: 13px; font-weight: bold;">[responsible] like 'Alex'</span>. Search for all items with this value in the <span style="font-weight: bold;">Assigned to</span> field.</p>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец примера</span></p>
|
||
<ol style="list-style-type:upper-roman" start="2">
|
||
<li value="2" style="line-height: 1.28; margin-top: 0; margin-right: 0; margin-bottom: 11px;"><span style="font-weight: bold;">Full string match </span>is represented by the value <code><b>LIKEF</b></code>.</li></ol>
|
||
<p style="line-height: 1.28; margin: 0 0 11px 34px;">The <code><b>LIKEF</b></code> operation allows you to search for exact matches of text, as well as set rules for finding a specified value in a certain part of a string. Using the operation helps to narrow down the search results.</p>
|
||
<p style="line-height: 1.28; margin: 0 0 11px 34px;">Available properties for using <code><b>LIKEF</b></code>:</p>
|
||
<ul style="list-style-type:disc">
|
||
<li class="p_Normal" style="margin-top: 0; margin-right: 0; margin-bottom: 0;"><a href="360009707032.html#string" class="topiclink">String</a>.</li><li class="p_Normal" style="margin-top: 0; margin-right: 0; margin-bottom: 0;"><a href="360009707032.html#category" class="topiclink">Category</a>.</li><li class="p_Normal" style="margin-top: 0; margin-right: 0; margin-bottom: 0;"><a href="360009707032.html#account" class="topiclink">Account</a>.</li><li class="p_Normal" style="margin-top: 0; margin-right: 0; margin-bottom: 0;"><a href="360009707032.html#phone-number" class="topiclink">Phone number</a>.</li><li class="p_Normal" style="margin-top: 0; margin-right: 0; margin-bottom: 0;"><a href="360009707032.html#email" class="topiclink">Email</a>.</li><li class="p_Normal" style="margin-top: 0; margin-right: 0; margin-bottom: 0;"><a href="360009707032.html#full-name" class="topiclink">Full name</a>.</li><li class="p_Normal" style="margin-top: 0; margin-right: 0; margin-bottom: 0;"><a href="360009707032.html#link" class="topiclink">Link</a>.</li></ul>
|
||
<p class="p_Normal" style="margin: 0 0 0 34px;">Rules for creating queries using the <code><b>LIKEF</b></code><span style="font-size: 13px;"> </span>operation:</p>
|
||
<ul style="list-style-type:disc">
|
||
<li class="p_Normal" style="margin-top: 0; margin-right: 0; margin-bottom: 0;"><span style="font-weight: bold;">The _ symbol</span>. The underscore means any symbol. It can be used before or after the searched value.</li><li class="p_Normal" style="margin-top: 0; margin-right: 0; margin-bottom: 0;"><span style="font-weight: bold;">The % symbol</span>. The percent indicates that any number of characters can be included before or after the searched value.</li><li class="p_Normal" style="margin-top: 0; margin-right: 0; margin-bottom: 0;"><span style="font-weight: bold;">Combined symbols</span>. The <span style="font-weight: bold;">_</span> and <span style="font-weight: bold;">%</span> symbols can be combined and used in a query multiple times to create complex search templates.</li><li class="p_Normal" style="margin-top: 0; margin-right: 0; margin-bottom: 0;"><span style="font-weight: bold;">Character escaping</span>. If the value contains control characters, (such as <span style="font-weight: bold;">_</span> or <span style="font-weight: bold;">%</span>), they must be escaped with a backslash <span style="font-weight: bold;">\</span>.</li></ul>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало примера</span></p>
|
||
<p class="p_Normal"><span style="font-weight: bold;">Examples</span></p>
|
||
<ol style="list-style-type:decimal">
|
||
<li value="1" class="p_Normal"><span style="font-weight: bold;">[client] likef 'John'</span>.<span style="font-weight: bold;"> </span>Will search for entries where the <span style="font-weight: bold;">Client</span> field contains the exact value <span style="font-weight: bold;">John</span>. For example, John Smith, John Brown, etc.</li><li value="2" class="p_Normal"><span style="font-weight: bold;">[string] likef </span><span style="font-weight: bold;">'_010203'</span>. Searches for strings starting with any character followed by the specified value <span style="font-weight: bold;">010203</span>.</li><li value="3" class="p_Normal"><span style="font-weight: bold;">[phone] likef '7912%'</span>. Will recover all the entries where the phone number starts with <span style="font-weight: bold;">7912 </span>and contains any number of symbols.</li><li value="4" class="p_Normal"><span style="font-weight: bold;">[order_name] likef 'Products%10_2024'</span>. Searches for orders whose name starts with the <span style="font-weight: bold;">Products</span> value, contains any number of symbols, ends with <span style="font-weight: bold;">10</span>, any symbol, and <span style="font-weight: bold;">2024</span>.</li><li value="5" class="p_Normal"><span style="font-weight: bold;">[email] likef '_smith\%@example%'</span>. Will search for emails that start with one unknown symbol, contain <span style="font-weight: bold;">smith%@example</span>, and end with any domain. The percent symbol, which is included in the email, is escaped by <span style="font-weight: bold;">\</span>.</li></ol>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец примера</span></p>
|
||
<ol style="list-style-type:upper-roman" start="2">
|
||
<li value="3" style="line-height: 1.28; margin-top: 0; margin-right: 0; margin-bottom: 11px;"><span style="font-weight: bold;">Check for a missing value</span> is represented by the value <code><b>IS NULL</b></code> or <code><b>IS EMPTY</b></code>.</li></ol>
|
||
<p style="line-height: 1.28; margin: 0 0 11px 34px;">The <code><b>IS NULL</b></code> and <code><b>IS EMPTY</b></code> operations are used in any register to check for the absence of a value in a specified field. They allow you to find app items where the field does not contain any data.</p>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало примера</span></p>
|
||
<p style="text-indent: -24px; line-height: 1.28; margin: 0 0 11px 22px;">Example</p>
|
||
<p style="text-indent: -24px; line-height: 1.28; margin: 0 0 11px 22px;"><span style="font-size: 13px; font-weight: bold;">[budget] is null</span> or <span style="font-size: 13px; font-weight: bold;">[budget] is empty</span>. Search for orders where no budget is specified. </p>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец примера</span></p>
|
||
<ol style="list-style-type:upper-roman" start="4">
|
||
<li value="4" style="line-height: 1.28; margin-top: 0; margin-right: 0; margin-bottom: 11px;"><span style="font-weight: bold;">Inclusion in a set</span> is represented by the value <code><b>IN</b></code>.</li></ol>
|
||
<p style="line-height: 1.28; margin: 0 0 11px 0;">This is a case-insensitive operation to check the contents of an app property. Values to be searched are enclosed in parentheses, separated by commas, and not separated by spaces. When using the <a href="eql-syntax.html#current-user" class="topiclink">current user search function</a> in a query, the arguments can be specified in any order.</p>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало примера</span></p>
|
||
<p style="text-indent: -24px; line-height: 1.28; margin: 0 0 11px 22px;">Examples</p>
|
||
<ol style="list-style-type:decimal">
|
||
<li value="1" style="line-height: 1.28; margin-top: 0; margin-right: 0; margin-bottom: 11px;"><span style="font-size: 13px; font-weight: bold;">[order_number] in (6,7,8,9)</span><span style="font-size: 13px;">.</span> Search for all orders with numbers containing the listed figures.</li><li value="2" style="line-height: 1.28; margin-top: 0; margin-right: 0; margin-bottom: 11px;"><span style="font-size: 13px; font-weight: bold;">[client] in ('Maria', 'Henry', 'Smith')</span>. Search for all clients with the listed names.</li><li value="3" style="line-height: 1.28; margin-top: 0; margin-right: 0; margin-bottom: 11px;"><span style="font-size: 13px; font-weight: bold;">[__createdBy] in CurrentUser()</span><span style="font-size: 13px;"> or </span><span style="font-size: 13px; font-weight: bold;">CurrentUser() in [__createdBy].</span><span style="font-size: 13px;"> </span>Equivalent queries to find all items created by the current system user.</li><li value="4" style="line-height: 1.28; margin-top: 0; margin-right: 0; margin-bottom: 11px;"><span style="font-size: 13px; font-weight: bold;">[orders] in (from [documents.contracts] select [__id] where [total] > 100)</span>. Select all orders with the contracts having a value of more than 100 in the <span style="font-weight: bold;">Amount</span> field. To read more about making such expressions, see <a href="eql-syntax.html#subquery" class="topiclink">Subqueries</a>. </li></ol>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец примера</span></p>
|
||
<h2 class="p_Heading2"><a id="logical-operators" class="hmanchor"></a><span class="f_Heading2">Logical operators (connectives)</span></h2>
|
||
<p style="line-height: 1.28; margin: 0 0 11px 0;">Logical operators are used to check multiple conditions in a single query: </p>
|
||
<ol style="list-style-type:upper-roman">
|
||
<li value="1" style="line-height: 1.28; margin-top: 0; margin-right: 0; margin-bottom: 11px;"><span style="font-weight: bold;">Logical AND</span>. The <code><b>AND</b></code> operator combines several conditions. In this case, all conditions must be met. </li></ol>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало примера</span></p>
|
||
<p style="text-indent: -24px; line-height: 1.28; margin: 0 0 11px 22px;">Examples </p>
|
||
<ol style="list-style-type:decimal">
|
||
<li value="1" class="p_Normal"><span style="font-weight: bold;">[prepayment] = 1000 and [budget] > 3000</span>. Search for orders for which prepayment is equal to 1,000 and the budget exceeds 3,000.</li><li value="2" class="p_Normal"><span style="font-weight: bold;">[__createdAt] >= Datetime(2023, 1) and [__createdAt] < Datetime(2023, 3)</span>. Find all items that were created during January and February 2023, i.e., the date is equal to or greater than January and not greater than March.</li></ol>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец примера</span></p>
|
||
<ol style="list-style-type:upper-roman" start="2">
|
||
<li value="2" style="line-height: 1.28; margin-top: 0; margin-right: 0; margin-bottom: 11px;"><span style="font-weight: bold;">Logical OR</span>. The <code><b>OR</b></code><span style="font-size: 13px;"> </span>operator combines several conditions and requires at least one of them to be met. </li></ol>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало примера </span></p>
|
||
<p style="text-indent: -24px; line-height: 1.28; margin: 0 0 11px 22px;">Examples</p>
|
||
<ol style="list-style-type:decimal">
|
||
<li value="1" class="p_Normal"><span style="font-weight: bold;">[order_number] in (6,7) or [client] is null</span>. The search result will show the orders with the given numbers or for which the client is not specified.</li><li value="2" class="p_Normal"><span style="font-weight: bold;">[client] like 'Alex' or [orders] in (from [documents.contracts] select [__id] where [total] > 10000)</span>. Search for orders where the client name contains the specified value or the contract amount exceeds 10,000.</li></ol>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец примера</span></p>
|
||
<ol style="list-style-type:upper-roman" start="3">
|
||
<li value="3" style="line-height: 1.28; margin-top: 0; margin-right: 0; margin-bottom: 11px;"><span style="font-weight: bold;">Logical NOT</span>. The <code><b>NOT</b></code><span style="font-size: 13px;"> </span>operator is used for one condition. It must not be met. </li></ol>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало примера</span></p>
|
||
<p style="text-indent: -24px; line-height: 1.28; margin: 0 0 11px 22px;">Examples</p>
|
||
<ol style="list-style-type:decimal">
|
||
<li value="1" class="p_Normal"><span style="font-weight: bold;">not [payment] is null</span>. Search for all items for which any status is set, i.e. the status contains a non-empty value.</li><li value="2" class="p_Normal"><span style="font-weight: bold;">not [client_name] in ('Smith', 'Johnson')</span>. Search for orders where the client’s name does not match the specified value. </li></ol>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец примера</span></p>
|
||
<h3 class="p_Heading3"><a id="query-priorities" class="hmanchor"></a><span class="f_Heading3">Priorities of logical operations</span></h3>
|
||
<p style="line-height: 1.20; background: #ffffff; margin: 10px 0 0 0;">When using more than two operations in one query, you can specify which condition is prioritized. It is checked first and will be displayed in the search results above the others. In complex queries, parentheses are used to indicate the prioritized condition. </p>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало примера</span></p>
|
||
<p class="p_Normal">Examples</p>
|
||
<ol style="list-style-type:decimal">
|
||
<li value="1" class="p_Normal"><span style="font-weight: bold;">not ([client_name] like 'Aisha' or [client_name] like 'Albert')</span>. Search for orders with client names that do not contain the first or the second indicated value.</li><li value="2" class="p_Normal"><span style="font-weight: bold;">(not [client_name] = 'Alex') and [client_name] like 'Al'</span>. Search for orders with client names that do not contain the first value <span style="font-weight: bold;">Alex</span> but have the second value <span style="font-weight: bold;">Al</span>. </li></ol>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец примера</span></p>
|
||
<h2 class="p_Heading2"><a id="functions" class="hmanchor"></a><span class="f_Heading2">Functions</span></h2>
|
||
<p style="line-height: 1.28; margin: 0 0 11px 0;">Functions in EQL queries can be used to assign a value to app properties as well as to calculate it:</p>
|
||
<ol style="list-style-type:upper-roman">
|
||
<li value="1" style="line-height: 1.28; margin-top: 0; margin-right: 0; margin-bottom: 11px;"><code><b>Datetime()</b></code>.<span style="font-size: 13px;"> </span></li></ol>
|
||
<p style="line-height: 1.28; margin: 0 0 11px 34px;">The function defines the representation of the date specified in the function parameters.Parameters are written in parentheses with enumeration separated by commas. <br />
|
||
Numeric values of the year, month, day, hour, minute, and second, as well as the string representation of the time zone, are specified as parameters. The only mandatory parameter is the year, the others are specified optionally. If no time is selected, the request accepts the value of zero hours, minutes, and seconds. <br />
|
||
You can set the date with functions that are calculated at the time the query is executed:</p>
|
||
<ul style="list-style-type:disc">
|
||
<li style="line-height: 1.28; margin-top: 0; margin-right: 0; margin-bottom: 11px;"><code><b>Today</b></code>. Current date.</li><li style="line-height: 1.28; margin-top: 0; margin-right: 0; margin-bottom: 11px;"><code><b>Now</b></code>. Current time. </li></ul>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало примера</span></p>
|
||
<p class="p_Normal">Examples </p>
|
||
<ol style="list-style-type:decimal">
|
||
<li value="1" class="p_Normal"><span style="font-weight: bold;">[__createdAt] > Datetime(2022)</span>. Search for items with a creation date later than 2022.</li><li value="2" class="p_Normal"><span style="font-weight: bold;">[__createdAt] > Datetime(2023, 1, 31)</span>. Search for items with a creation date later than January 31, 2023.</li><li value="3" class="p_Normal"><span style="font-weight: bold;">[finish_date] > Datetime(2023, 2, '+09:00')</span>. Search for orders that were assembled later than February 2023 given the time zone.</li><li value="4" class="p_Normal"><span style="font-weight: bold;">[__createdAt] < Datetime('Now')</span>. Search for items with creation date earlier than the current time.</li><li value="5" class="p_Normal"><span style="font-weight: bold;">[closing_date] > Datetime('Today')</span>. Search for deals, the closing date of which is later than the current date.</li></ol>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец примера</span></p>
|
||
<ol style="list-style-type:upper-roman" start="2">
|
||
<li value="2" style="line-height: 1.20; background: #ffffff; margin-top: 10px; margin-right: 0; margin-bottom: 0;"><code><b>Time()</b></code>.<span style="font-size: 13px;"> </span></li></ol>
|
||
<p style="line-height: 1.20; background: #ffffff; margin: 10px 0 0 34px;">The function defines the representation of the time specified in the parameters. Numerical values of the hour, minute, and second are specified as parameters. The only mandatory parameter is the hour. Parameters are enclosed in parentheses and separated by commas. </p>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало примера</span></p>
|
||
<p class="p_Normal">Examples</p>
|
||
<ol style="list-style-type:decimal">
|
||
<li value="1" class="p_Normal"><span style="font-weight: bold;">[closing_time] < Time(17)</span>. Search for deals closed later than 5 PM.</li><li value="2" class="p_Normal"><span style="font-weight: bold;">[closing_time] < Time(12, 30, 00)</span>. Search for deals closed later than 12:30 PM. </li></ol>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец примера</span></p>
|
||
<ol style="list-style-type:upper-roman" start="3">
|
||
<li value="3" style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><a id="relative-date" class="hmanchor"></a><code><b>RelativeDatetime('start', 'end')</b></code>.<span style="font-size: 13px;"> </span> </li></ol>
|
||
<p style="line-height: 1.20; margin: 7px 0 7px 34px;">The function determines a time interval calculated relative to the current date, taking into account the specified time zone in the system. The <span style="font-weight: bold;">=</span> or <span style="font-weight: bold;">IN</span> operators are used to calculate the function. </p>
|
||
<p style="line-height: 1.20; margin: 7px 0 7px 37px;">The search period is specified in parentheses. The function always specifies the start and end parameters of the period, enclosed in single quotes and separated by a comma. To calculate each parameter, an alphanumeric expression or their combination is used:</p>
|
||
<ul style="list-style-type:disc">
|
||
<li style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-weight: bold;">Numeric designation</span>: a positive or negative quantitative range for calculating the period. A minus sign is used for searching past periods, and a plus sign for future dates. Zero denotes the current date and does not require the use of a plus sign.</li><li style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-weight: bold;">Letter designation</span>: a unit of time interval such as hour, day, year, etc. </li></ul>
|
||
<p style="line-height: 1.20; margin: 7px 0 7px 0;"><a class="dropdown-toggle" style="font-style: normal; font-weight: normal; color: #000000; background-color: transparent; text-decoration: none;" href="javascript:HMToggle('toggle','TOGGLE0186A1')">Available letter designations for the time interval</a></p>
|
||
<div id="TOGGLE0186A1" class="dropdown-toggle-body" style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 7px 0 7px 0;"><table style="border:none; border-spacing:0;">
|
||
<tr>
|
||
<td style="vertical-align:top; padding:0; border:none"><ol style="list-style-type:decimal">
|
||
<li value="1" style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-weight: bold;">h</span> for an hour.</li><li value="2" style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-weight: bold;">d</span> for a day.</li><li value="3" style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-weight: bold;">w</span> for a week.</li><li value="4" style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-weight: bold;">m</span> for a month.</li><li value="5" style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-weight: bold;">q </span>for a quarter (3 months).</li><li value="6" style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-weight: bold;">y </span>for a year.</li></ol>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
<p style="line-height: 1.20; margin: 7px 0 7px 37px;">The parameters are calculated sequentially. In this case, the calculation is not based on units from the current date, but on a calendar period of time. </p>
|
||
<p style="line-height: 1.20; margin: 7px 0 7px 36px;">For example, if the current date is December 11, 2023, and the start of the period in the function is specified as <span style="font-weight: bold;">'-1m'</span> (minus one month), then it will not subtract 30 days from the current date but rather a calendar month. Thus, the start of the period in the search results will be considered as November 1, 2023. </p>
|
||
<p style="line-height: 1.20; margin: 7px 0 7px 37px;">When specifying period parameters, it is important to consider the peculiarities of their calculation: </p>
|
||
<ul style="list-style-type:disc">
|
||
<li style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><code><b>start</b></code>.<span style="font-size: 13px;"> </span>The parameter represents the start of the period relative to the current date. The calculated value is included in the search result. Examples of parameter input:<ul style="list-style-type:circle">
|
||
<li style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-size: 13px; font-weight: bold;">'0h'</span>. Search from the current date and the beginning of the current hour.</li><li style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-size: 13px; font-weight: bold;">'+1m'</span>. Search from the beginning of the next month.</li><li style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-size: 13px; font-weight: bold;">'-1w+1d'</span>. The start date of the search is calculated as follows: subtract one calendar week from the current day and add one day. Thus, if the current day is Monday, the search starts from the beginning of last Tuesday.</li></ul>
|
||
<li style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><code><b>end</b></code>.<span style="font-size: 13px;"> </span>The parameter represents the end of the period relative to the current date. When calculating the smallest time interval specified in the function, one unit is added. The resulting time value is not included in the search, i.e., all values less than but not equal to the calculated result are considered. Examples of parameter input:<ul style="list-style-type:circle">
|
||
<li style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-size: 13px; font-weight: bold;">'0h'</span>. Search until the end of the current hour.</li><li style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-size: 13px; font-weight: bold;">'0d'</span>. Search until the end of the current day.</li><li style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-size: 13px; font-weight: bold;">'+1m'</span>. Until the end of the next month.</li><li style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-size: 13px; font-weight: bold;">'-1w+1d'</span>. The end date of the search is calculated as follows: regardless of the current day of the week, the calculation starts from Monday of the previous calendar week. Then, the day specified in the parameter is added, as well as one unit of the smallest time interval — in this case, another day. The calculation results in the previous week's Wednesday. Since all values less than but not equal to the calculated parameter are included in the end of the period, the search is performed until the end of last Tuesday.</li></ul></li></ul>
|
||
<p style="line-height: 1.20; margin: 7px 0 7px 36px;">Please note that the start of the period after calculation should not be greater than or equal to its end, and the end should be less than or equal to the start. When composing such a request, you will see an error indicating an incorrectly specified format for relative dates.</p>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало примера</span></p>
|
||
<p style="line-height: 1.20; margin: 7px 0 7px 0;">The most common examples of queries</p>
|
||
<ol style="list-style-type:decimal">
|
||
<li value="1" style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-size: 13px; font-weight: bold;">[date] IN RelativeDatetime('0d', '0d')</span>. Search for the current date.</li><li value="2" style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-size: 13px; font-weight: bold;">[date] IN RelativeDatetime('-1d', '-1d')</span>. Search for the previous day.</li><li value="3" style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-size: 13px; font-weight: bold;">[date] IN RelativeDatetime('0w', '0w')</span>. Items for the current week.</li><li value="4" style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-size: 13px; font-weight: bold;">[date] IN RelativeDatetime('-1w', '-1w')</span>. Search for the previous week.</li><li value="5" style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-size: 13px; font-weight: bold;">[date] IN RelativeDatetime('-7d', '-1d')</span>. Items for the past seven days.</li><li value="6" style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-size: 13px; font-weight: bold;">[date] IN RelativeDatetime('+1w', '+1w')</span>. Considers the entire upcoming week.</li><li value="7" style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-size: 13px; font-weight: bold;">[date] IN RelativeDatetime('-1w+2d', '-1w+3d')</span>. Search from last Wednesday to the end of last Thursday.</li><li value="8" style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-size: 13px; font-weight: bold;">[date] IN RelativeDatetime('-1m', '+1m')</span>. Search from the beginning of last month to the end of next month.</li><li value="9" style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-size: 13px; font-weight: bold;">[date] IN RelativeDatetime('0y+3q','0y')</span>. Items for the third and fourth quarters of the current year, i.e., search from the third quarter to the end of the year.</li><li value="10" style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-size: 13px; font-weight: bold;">[date] IN RelativeDatetime('0y-2m', '0y-1m')</span>. Search for the last and second-to-last month of the previous year.</li><li value="11" style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-size: 13px; font-weight: bold;">[date] IN RelativeDatetime('+1y', '+1y0m')</span>. Considers the entire first month of the next year.</li></ol>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец примера</span></p>
|
||
<ol style="list-style-type:upper-roman" start="4">
|
||
<li value="4" style="line-height: 1.28; margin-top: 0; margin-right: 0; margin-bottom: 11px;"><code><b>Count()</b></code>.</li></ol>
|
||
<p style="line-height: 1.28; margin: 0 0 11px 34px;">This is a case-insensitive function that determines the number of elements of a parameter. The parameter can be a property containing a multiple value or a subquery. In comparison operations, the function is specified before the calculated parameter without a space.</p>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало примера</span></p>
|
||
<p class="p_Normal">Examples</p>
|
||
<ol style="list-style-type:decimal">
|
||
<li value="1" class="p_Normal"><span style="font-weight: bold;">count([orders]) > 3</span>. Search for companies for which more than three orders have been created.</li><li value="2" class="p_Normal"><span style="font-weight: bold;">count(from [documents.contract] where parent.[__id] in [client] and [total] > 10000) > 2</span>. Search for companies for which more than two contracts were created, with the total amount exceeding 10,000.</li></ol>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец примера</span></p>
|
||
<ol style="list-style-type:upper-roman" start="5">
|
||
<li value="5" style="line-height: 1.28; margin-top: 0; margin-right: 0; margin-bottom: 11px;"><code><b>CurrentUser()</b></code>.<span style="font-size: 13px;"> </span></li></ol>
|
||
<p style="text-indent: -24px; line-height: 1.28; margin: 0 0 11px 22px;">This function returns the identifier of the current user. Used to determine the value of an app property.</p>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало примера</span></p>
|
||
<p class="p_Normal"><a id="current-user" class="hmanchor"></a>Example </p>
|
||
<p class="p_Normal"><span style="font-weight: bold;">[responsible] = CurrentUser()</span>. Orders assigned to the current user. </p>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец примера</span></p>
|
||
<ol style="list-style-type:upper-roman" start="6">
|
||
<li value="6" style="line-height: 1.28; margin-top: 0; margin-right: 0; margin-bottom: 11px;"><a id="refitem" class="hmanchor"></a><code><b>Refitem()</b></code>.<span style="font-size: 13px;"> </span></li></ol>
|
||
<p style="line-height: 1.28; margin: 0 0 11px 34px;">This is a function for getting an item from the <a href="360009707032.html#arbitrary-app" class="topiclink">Arbitrary app</a> field. It returns items whose fields reference a specific item from another app. The function specifies the path to the item, including the section code and the app where it is created, and the string representation of its identifier. </p>
|
||
<p style="line-height: 1.28; margin: 0 0 11px 37px;">Parameters are specified in two ways. Each value is enclosed in single quotes and separated by a comma. Also, the entire path can be specified in single quotes and parameters can be combined with a colon. </p>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало примера</span></p>
|
||
<p class="p_Normal">Examples</p>
|
||
<ol style="list-style-type:decimal">
|
||
<li value="1" class="p_Normal"><span style="font-weight: bold;">[bill] = Refitem('documents', 'bills', '018a8dbb-04cd-7798-a363-aae245148b10')</span> or <span style="font-weight: bold;">[bill] = Refitem('documents:bills:018a8dbb-04cd-7798-a363-aae245148b10')</span>. Equivalent queries where a search is conducted based on the <span style="font-weight: bold;">Bill</span> field in items of the <span style="font-weight: bold;">Contracts</span> app. As a result, the contract associated with a specific bill from another workspace and app will be displayed.</li><li value="2" class="p_Normal"><span style="font-weight: bold;">[bill] is null</span>. Search for contracts where the bill is not specified, i.e., there is no reference to an item from the <span style="font-weight: bold;">Bills</span> app.</li></ol>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец примера</span></p>
|
||
<h2 class="p_Heading2"><a id="subquery" class="hmanchor"></a><span class="f_Heading2">Subqueries</span></h2>
|
||
<p style="line-height: 1.20; background: #ffffff; margin: 10px 0 0 0;">A subquery is a nested EQL query that is part of another query. When composing an expression from several queries, the subquery is marked with parentheses.</p>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало примера </span></p>
|
||
<p class="p_Normal">Example</p>
|
||
<p class="p_Normal"><span style="font-weight: bold;">not ([__name] like 'Alex' or [__name] like 'An')</span>. Items whose name does not contain the specified values.</p>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец примера </span></p>
|
||
<h3 class="p_Heading3"><span class="f_Heading3">Selection operators in subqueries</span></h3>
|
||
<p style="line-height: 1.20; background: #ffffff; margin: 10px 0 0 0;">In a subquery, you can access the app items from other workspaces of the system and also the <a href="360009707032.html#arbitrary-app" class="topiclink">Arbitrary app</a> properties. For this purpose, the operator of data selection by criteria is used: </p>
|
||
<ul style="list-style-type:disc">
|
||
<li style="line-height: 1.20; background: #ffffff; margin-top: 10px; margin-right: 0; margin-bottom: 0;"><code><b>SELECT_FROM_WHERE</b></code> or <code><b>FROM_SELECT_WHERE</b></code>.</li><li style="line-height: 1.20; background: #ffffff; margin-top: 10px; margin-right: 0; margin-bottom: 0;"><code><b>FROM_WHERE</b></code>.<span style="font-size: 13px;"> </span>Is used for the <code><b>Count()</b></code> function to determine the count. Specifies in which app the property being searched is created.</li></ul>
|
||
<h4 class="p_Heading4"><span class="f_Heading4">Selection operators syntax</span></h4>
|
||
<p class="p_Normal">Each subquery specifies:</p>
|
||
<ol style="list-style-type:decimal">
|
||
<li value="1" class="p_Normal"><span style="font-weight: bold;">Data Source</span>. The app code from which the data is selected.</li><li value="2" class="p_Normal"><span style="font-weight: bold;">Property to search for</span>. Defines which property in the data source is used for the search.</li><li value="3" class="p_Normal"><span style="font-weight: bold;">Search Condition</span>. The criteria by which the data is filtered.</li></ol>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало примера</span></p>
|
||
<p class="p_Normal"><span style="font-weight: bold;">Examples</span></p>
|
||
<ol style="list-style-type:decimal">
|
||
<li value="1" class="p_Normal"><span style="font-weight: bold;">[clients] in (from [clients.orders] select [__id] where [total] > 1000)</span>. Selection of the <span style="font-weight: bold;">Customer</span> app items for whom orders with the amount of more than 1,000 have been created.</li><li value="2" class="p_Normal"><span style="font-weight: bold;">[contracts] in (select [__id] from [clients.leads] where [__name] = 'Star Inc.')</span>. Search for contracts from a property of the <span style="font-weight: bold;">Arbitrary app</span> type, where the company name matches the one specified in the query.</li><li value="3" class="p_Normal"><span style="font-weight: bold;">count(from [bookstore.book] where parent.[__id] in [authors]) > 0</span>. Search for authors with at least one book in their profile.</li></ol>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец примера</span></p>
|
||
<h3 class="p_Heading3"><span class="f_Heading3">Nested subqueries</span></h3>
|
||
<p style="line-height: 1.20; background: #ffffff; margin: 10px 0 0 0;">Subqueries can include other subqueries. To indicate the level of nesting, the following operators are used to access app properties:</p>
|
||
<ul style="list-style-type:disc">
|
||
<li style="line-height: 1.20; background: #ffffff; margin-top: 10px; margin-right: 0; margin-bottom: 0;"><code><b>PARENT</b></code> is used to access the properties of the parent app.</li><li style="line-height: 1.20; background: #ffffff; margin-top: 10px; margin-right: 0; margin-bottom: 0;"><code><b>ROOT</b></code><span style="font-weight: bold;"> </span>accesses the fields of the root app, which is specified at the beginning of the query. For example, it can be the app on whose page the EQL search is performed.</li></ul>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало примера</span></p>
|
||
<p class="p_Normal">Query examples</p>
|
||
<ol style="list-style-type:decimal">
|
||
<li value="1" class="p_Normal"><span style="font-weight: bold;">count(from [clients.contacts] where parent.[__id] in [contact]) > 1</span>. Search for orders with more than one client specified.</li><li value="2" class="p_Normal"><span style="font-weight: bold;">count(from [bookstore.book] where root.[__id] in [authors] and (count(from [bookstore.copyright] where parent.[__id] = [book] and [finish_date] > Datetime('Now')) > 0)) > 1</span>. Search for book authors with more than one valid book rights agreement. </li></ol>
|
||
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец примера</span></p>
|
||
|
||
<div class="bottom-nav">
|
||
|
||
<a id="prev-link" class="topic__navi_prev" href="eql365-search.html">
|
||
<span class="bottom-nav__arrow bottom-nav__arrow--prev"></span> <span
|
||
class="bottom-nav__link">eql365-search.html</span>
|
||
</a>
|
||
|
||
|
||
<a id="next-link" class="topic__navi_next" href="app-data-in-scripts.html">
|
||
<span class="bottom-nav__link">app-data-in-scripts.html</span> <span
|
||
class="bottom-nav__arrow bottom-nav__arrow--next"></span>
|
||
</a>
|
||
|
||
</div>
|
||
<!-- добавляет на страницу строку блок Была ли статья полезной? -->
|
||
<div class="feedback" id="feedback"><div class="feedback-help"><span><b>Was this helpful?</b></span><form action="" method="POST" class="feedback-form" id="feedback-form"><div class="feedback__popup feedback__popup-response" id="feedback__popup_thx" style="display: none;">Thanks for your feedback!</div><div class="feedback__popup" id="feedback__popup_why" style="display: none;"><div class="feedback__popup-header">Please specify why:</div><input type="radio" name="category" id="bad_recommendation" value="bad_recommendation"><label for="bad_recommendation">Recommendations did not help me</label><input type="radio" name="category" id="difficult_text" value="difficult_text"><label for="difficult_text">Article is hard to understand</label><input type="radio" name="category" id="no_answer" value="no_answer"><label for="no_answer">Didn`t answer my question</label><input type="radio" name="category" id="bad_header" value="bad_header"><label for="bad_header">Content does not match the topic</label><input type="radio" name="category" id="other_reason" value="other_reason"><label for="other_reason">Other</label></div><div class="feedback__popup" id="feedback__popup-other" style="display: none;"><div class="feedback__popup-header">How we can improve it?</div><textarea class="feedback__textarea" name="other" id=""></textarea><input type="submit" class="feedback__other-btn" value="Submit"></div><div class="feedback-form__btn-group"><input type="radio" name="useful" id="feedback__useful_yes" value="true"><label for="feedback__useful_yes"><img src="like.svg" class="small-img" alt="like"><spanclass="feedback-form__btn-group_yes-btn">Yes</spanclass="feedback-form__btn-group_yes-btn"></label><input type="radio" name="useful" id="feedback__useful_no" value="false"><label for="feedback__useful_no"><img src="dislike.svg" class="small-img" alt="dislike"><spanclass="feedback-form__btn-group_no-btn">No</spanclass="feedback-form__btn-group_no-btn"></label></div><select name="category"><option disabled="">Please specify why</option><option value="bad_recommendation" selected="">Recommendations did not help me</option><option value="difficult_text">Article is hard to understand</option><option value="no_answer">Didn`t answer my question</option><option value="bad_header">Content does not match the topic</option><option value="other_reason">Other</option></select><input type="submit"></form></div><div class="found_typo"><p style="margin: 0px; margin-top: 16px !important;"><span><b>Found a typo?</b></span> Select it and press <i>Ctrl+Enter</i> to send us feedback</p></div></div>
|
||
|
||
</section>
|
||
</div>
|
||
<aside class="article__sidebar" style="display:none">
|
||
<input type="checkbox" />
|
||
<div class="article__arrow"></div>
|
||
<div class="table-of-contents elma365-right" id="toc2Content">
|
||
<h3 class="h3-toc">In this topic</h3>
|
||
<nav id="toc2"></nav>
|
||
</div>
|
||
</aside>
|
||
</div>
|
||
</article>
|
||
</main>
|
||
<footer class="footer">
|
||
<div class="footer-container">
|
||
<div class="footer-mobile">
|
||
|
||
<ul class="footer-mobile__list"><li><a href="https://brix365.com/en/" target="_blank">BRIX</a></li><li><a href="https://tssdk.brix365.com/en/latest/" target="_blank">SDK</a></li><li><a href="https://api.brix365.com/en/" target="_blank">API</a></li></ul><ul class="footer-mobile__list"><li><a href="https://brix365.com/en/help/platform/get-trial.html">Platform</a></li><li><a href="https://brix365.com/en/help/ecm/ecm-functions.html">ECM</a></li><li><a href="https://brix365.com/en/help/service/service-functions.html">Service</a></li><li><a href="https://brix365.com/en/help/projects/projects-functions.html">Projects</a></li></ul>
|
||
|
||
|
||
</div>
|
||
<div class="footer-wrap">
|
||
|
||
<div><span class="mobile-question-popup">Send feedback</span><form method="POST" action class="question__popup question-xs" id="question__popup"><div class="question-wrap"><span class="close"></span><span class="title">Ask a question</span><label for="help_question" style="display: none;"></label><textarea name="help_question" id="help_question"></textarea><input type="submit" value="Send"></div></form><div class="hidden fade-in question-success-xs">Sent</div></div>
|
||
|
||
<div class="footer-flex-b">
|
||
<span class="footer-copy">© 2025 BRIX</span>
|
||
<ul class="footer-list">
|
||
|
||
<li class="footer-item">
|
||
<a href="#" class="arrow-top" style="display: block;"></a>
|
||
</li>
|
||
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
</footer>
|
||
<iframe name="hmnavigation" style="display:none!important"></iframe>
|
||
<script src="./jquery-ui.js"></script>
|
||
<!--script src="//cdn.jsdelivr.net/npm/featherlight@1.7.14/release/featherlight.min.js" type="text/javascript" charset="utf-8"></script-->
|
||
<script src="./jquery.tocify.min.js"></script>
|
||
<script src="./TypoReporter.min.js"></script>
|
||
<script src="./google-search.js"></script>
|
||
<script src="./main.js"></script>
|
||
<script type="text/javascript">
|
||
HMInitToggle('TOGGLE0186A1','hm.type','dropdown','hm.state','0');
|
||
</script>
|
||
</body>
|
||
|
||
</html>
|