InforCRM (SData): Difference between revisions
Jkuehlthau (talk | contribs) |
Jkuehlthau (talk | contribs) |
||
Line 407: | Line 407: | ||
Examples: | Examples: | ||
<source lang="vb"> | |||
Email ne "" orderBy=AccountName | Email ne "" orderBy=AccountName | ||
</source> | |||
<source lang="vb"> | |||
Email ne "" orderBy=AccountName desc,FirstName asc | Email ne "" orderBy=AccountName desc,FirstName asc | ||
</source> | |||
Some examples from the SData documentation: | Some examples from the SData documentation: | ||
<source lang="vb"> | |||
orderBy=postalAddress.countryCode asc,name desc | orderBy=postalAddress.countryCode asc,name desc | ||
orderBy=orderDate desc | orderBy=orderDate desc | ||
orderBy=orderDate desc,orderId asc | orderBy=orderDate desc,orderId asc | ||
</source> |
Revision as of 16:08, 3 April 2018
Origin
Filters
Infor SData is based on Sage Sdata. InforCRM was previously owned by Sage as SalesLogix. See this page for information about SData filters: http://sage.github.io/SData-2.0/pages/core/0212/. This table was taken from that page.
The query language supports the following operators:
Class |
Operator |
Meaning |
Basic |
Priority value |
Example |
---|---|---|---|---|---|
Member | x.y | member access | 1 | billingAddress.country | |
Unary |
-x |
unary minus | 2 |
- discount | |
not x | negation | 2 | not disabled | ||
Multiplicative | x mul y | multiplication | 3 | price mul 1.07 | |
x div y | division | 3 | price div 2 | ||
x mod y | modulus | 3 | index mod 2 | ||
Additive
|
x + y
|
addition
|
4
|
price + tax
| |
x - y
|
substraction
|
4
|
price - discount
| ||
Comparison
|
x eq y
|
equal
|
Yes
|
5
|
countryCode eq 'GB'
|
x ne y
|
not equal
|
Yes
|
5
|
countryCode ne 'GB'
| |
x lt y
|
less than
|
Yes
|
5
|
price lt 100.0
| |
x le y
|
less than or equal
|
Yes
|
5
|
price le 100.0
| |
x gt y
|
greater than
|
Yes
|
5
|
price gt 100.0
| |
x ge y
|
greater than or equal
|
Yes
|
5
|
price ge 100.0
| |
x between y and z
|
between
|
5
|
price between 100.0 and 500.0
| ||
x in (y, z)
|
contained in
|
5
|
countryCode in ('GB', 'US')
| ||
x like y
|
like
|
5
|
name like '%BANK%'
| ||
Logical
|
x and y
|
logical and
|
Yes
|
6
|
countryCode eq 'GB' and amount gt 1000.0
|
x or y
|
logical or
|
Yes
|
7
|
countryCode eq 'GB' or countryCode eq 'US'
|
The operators with the lowest priority value evaluate first. Within a given class, the operators associate from left to right, except for unary operators that associate right to left.
Parentheses can be used to override the priority value or association rules. The following table gives some examples:
Filter Examples
UserId eq 'ADMIN' and Type eq 'atAppointment'
Email ne ""
Sorting
As of April 3rd, 2018, you can sort Infor SData results. The sort(s) goes at the end of the filter, if you have one, and you can sort by multiple fields and use directions such as:
Examples:
Email ne "" orderBy=AccountName
Email ne "" orderBy=AccountName desc,FirstName asc
Some examples from the SData documentation:
orderBy=postalAddress.countryCode asc,name desc orderBy=orderDate desc orderBy=orderDate desc,orderId asc