Nama ERP DocsNama ERP Docs
Home
Namasoft.com
Data Model
GitHub
Home
Namasoft.com
Data Model
GitHub
  • Home

    • Search
    • Guides

      • بعض المعلومات عن استعمال هذا الموقع
      • Utility Links
      • System Minimum Requirements
      • Nama ERP Installation Guide
      • Troubleshooting System Hanging or Unresponsiveness
      • Jasper Reports Complete Guide for Nama ERP
      • Keyboard Shortcuts
      • Layout Names:
      • List Views
      • Approvals System - Approval Definition Full Guide
      • Entity Flows
      • دليل استخدام أداة إنشاء التقارير ونماذج الطباعة
      • الفواتير والضرائب والخصومات
      • Supply Chain
      • Manufacturing
      • Tempo Language Manual
      • Sending Invoices and Documents to Customers
      • SMS and WhatsApp Configuration in Nama ERP
      • Two-Factor Authentication (2FA) Guide
      • Field Filter with Criteria
      • تعديل الترجمات في نظام نما
      • Criteria Based Validation
      • صيغ الحضور والانصراف
      • الربط مع ماكينات الحضور والانصراف
      • Nama ERP Notification System
      • Scheduled Tasks (Task Scheduler)
      • Nama Properties
      • تطبيق الهواتف المحمولة
      • Mobile QR Integrator Guide
      • أعدادات الحقول و الشاشات - Generic Reference Overrider User Guide
      • ReportWizard User Documentation (أداة إنشاء تقرير)
      • ORACLE JDBC Integration Connection in context.xml for integration purposes
      • Nama ERP REST API
      • Criteria from Text Parser (Text Criteria Guide)
      • ضوابط إنشاء طلبات تطوير من قبل أقسام الدعم الفني والتجهيز بالشركة
      • e-commerce integration (Magento)
      • .
    • Examples
    • Reprocessing Transactions
    • Frequently Asked Questions
    • AI Generated Entity Flows Documentation

      • Core
      • Accounting Module
      • AI Module
      • Contracting Module
      • CRM Module
      • EGTax Reader Module
      • Freight Management System Module
      • Hospital Management System Module
      • HR Module
      • e-commerce Integration Module
      • Manufacturing Module
      • POS Module
      • Real Estate Module
      • Service Center Module
      • Supply Chain Module
      • .
    • Release Notes

      • 2016
      • 2017
      • 2018
      • 2019
      • 2020
      • 2021
      • 2022
      • 2025
      • .
    • Video Tutorials

      • Supply Chain Videos
      • Report Wizard Videos
      • Human Resources Videos
      • .

Criteria from Text Parser (Text Criteria Guide)

Nama ERP provides a flexible text-based filtering mechanism that allows users to define filter criteria using a simple, structured format.

Each filter condition in Nama ERP consists of the following components:

  • Field ID: The property (field) to apply the filter on.

  • Operator: One of the following options:

    • Equal, NotEqual
    • GreaterThan, GreaterThanOrEqual
    • LessThan, LessThanOrEqual
    • StartsWith, NotStartsWith
    • EndsWith, NotEndWith
    • Contains, NotContain
    • In, NotIn (see Multiple Values with In/NotIn below)
    • OpenBracket, CloseBracket (used for grouping expressions, and do not require a field ID or value)
  • Compared Value: The value to compare against.

  • Logical Relationship: The logical connector to the next condition (AND or OR).

Conditional Operators (OrEmpty Suffix)

Any operator can have the OrEmpty suffix appended to make the condition optional when no value is provided. If the value is empty, the entire condition is skipped.

For example:

  • EqualOrEmpty - Applies Equal only if a value is provided
  • ContainsOrEmpty - Applies Contains only if a value is provided
  • GreaterThanOrEqualOrEmpty - Applies GreaterThanOrEqual only if a value is provided

This is useful for building dynamic filters where some criteria may or may not have values:

code,StartsWithOrEmpty,{userInput},AND;

If {userInput} is empty, this condition is ignored entirely.

Special Commands

distinct-values: Add this as a separate line to return only distinct records:

distinct-values
code,StartsWith,01,AND;

Multiple Values with In/NotIn

The In and NotIn operators allow you to match a field against multiple values. To specify multiple values in the text criteria format, separate them with the special delimiter @A=@X.

Syntax:

fieldID,In,value1@A=@Xvalue2@A=@Xvalue3,AND;

Examples:

Filter items where status is either "Active", "Pending", or "Review":

status,In,Active@A=@XPending@A=@XReview,AND;

Filter records where category code is NOT "CAT01" or "CAT02":

category.code,NotIn,CAT01@A=@XCAT02,AND;

Filter by multiple reference IDs:

warehouse.id,In,id1@A=@Xid2@A=@Xid3,AND;

Warning

The separator @A=@X must be used exactly as shown (case-sensitive). Do not add spaces around the separator.

Format

Each filter condition is represented as a line of text with four parts separated by commas:

fieldID,operator,value,logic;

Multiple conditions can be separated by semicolons (;) or newlines. Both formats are valid:

Single-line format:

code,StartsWith,01,AND;name1,Contains,abc,AND;

Multi-line format:

code,StartsWith,01,AND
name1,Contains,abc,AND

Default Values

  • If operator is omitted, it defaults to Equal
  • If logical relationship is omitted, it defaults to AND

This means the simplest form of a filter is just:

fieldID,,value

Which is equivalent to fieldID,Equal,value,AND

Special Field Formats

  • Date Fields: Format must be dd-MM-yyyy

  • Date-Time Fields: Format must be yyyy-MM-ddTHH:mm:ss.SSS (milliseconds can be 000)

  • Reference Fields: A reference is written as a colon-separated string:

    <id>:<entityType>:<code>
    
    • The code part is optional.
    • Alternatively, you can reference specific parts using .id or .code for clarity and simplicity.

Example

code,StartsWith,01,AND;
name1,Contains,abc,AND;
date1,Equal,06-07-2025,AND;
creationDate,GreaterThanOrEqual,2025-07-06T13:05:00.000,AND;
n1,Equal,10,AND;
section,Equal,ffff0001-79e2-11f2-8800-0000ff79c2dd:ItemSection:00,AND;

The last line can also be expressed in two alternative forms:

section.id,Equal,ffff0001-79e2-11f2-8800-0000ff79c2dd,AND;
section.code,Equal,00,AND;

Dynamic Values

In addition to static values, Nama ERP supports dynamic values that are evaluated at runtime. These are especially useful for date-based filters and user-specific criteria.

Date Dynamic Values

The following dynamic values can be used in place of static dates:

ValueDescription
$today()Current date
$now()Current date and time
$monthStart()First day of the current month
$monthEnd()Last day of the current month
$previousMonthStart()First day of the previous month
$previousMonthEnd()Last day of the previous month
$nextMonthStart()First day of the next month
$nextMonthEnd()Last day of the next month
$yearStart()First day of the current year
$yearEnd()Last day of the current year
$previousYearStart()First day of the previous year
$previousYearEnd()Last day of the previous year
$nextYearStart()First day of the next year
$nextYearEnd()Last day of the next year
$quarterStart()First day of the current quarter
$quarterEnd()Last day of the current quarter
$halveStart()First day of the current half-year (6-month period)
$halveEnd()Last day of the current half-year
$thirdStart()First day of the current third (4-month period)
$thirdEnd()Last day of the current third

Relative Date Values

You can also calculate dates relative to today:

ValueDescription
$todayPlusDays(N)Today plus N days
$todayMinusDays(N)Today minus N days
$todayPlusWeeks(N)Today plus N weeks
$todayMinusWeeks(N)Today minus N weeks
$todayPlusMonths(N)Today plus N months
$todayMinusMonths(N)Today minus N months
$todayPlusYears(N)Today plus N years
$todayMinusYears(N)Today minus N years

User Context Values

These dynamic values reference the current logged-in user:

ValueDescription
$currentuseridID of the current logged-in user
$currentempidID of the employee linked to the current user

Dynamic Values Example

date1,GreaterThanOrEqual,$monthStart(),AND;
date1,LessThanOrEqual,$monthEnd(),AND;
createdBy.id,Equal,$currentuserid,AND;
dueDate,LessThanOrEqual,$todayPlusDays(30),AND;

This example filters records where:

  • date1 is within the current month
  • createdBy is the current logged-in user
  • dueDate is within the next 30 days

Tips

You can use the screen Criteria Definition to visually build the required filter conditions through the system interface. Once you've defined the desired criteria using the UI, simply click the Convert to Text button to generate the equivalent text-based representation. This text can then be used directly in APIs or automation scripts.

Edit On github
Last Updated:: 12/23/25, 9:25 PM
Prev
Nama ERP REST API
Next
ضوابط إنشاء طلبات تطوير من قبل أقسام الدعم الفني والتجهيز بالشركة