x++


Boolean AND logic in Microsoft Dynamics AX 2012 AIF QueryCriteria


According to the documentation:
The system uses Boolean OR logic to connect all the tags.
Does this mean that it is entirely impossible to construct a QueryCriteria which performs a boolean AND operation between multiple CriteriaElements?
You should be able to get what you want by using a 'dirty trick' with queries.
There is a way to put custom expressions in query ranges by using the DataArea field or the RecId field and putting in your expression.
Example:
query = new Query();
dsInventTable = query.addDataSource(tableNum(InventTable));
// Add our range
queryBuildRange = dsInventTable.addRange(fieldNum(InventTable, DataAreaId));
queryBuildRange.value(strFmt('((%1 == %2) || ((%1 == %3) && (%4 == "%5")))',
fieldStr(InventTable, ItemType),
any2int(ItemType::Service),
any2int(ItemType::Item),
fieldStr(InventTable, ProjCategoryId),
queryValue("Spares")));
See the following link for more information : Expressions in query ranges

Related Links

Boolean AND logic in Microsoft Dynamics AX 2012 AIF QueryCriteria
Table: PrintMgmtSettings Field: Printjobsettings(Blob)
What happened to the hrplimittablerelationship table in ax-2012-r2?
Why is my changes ignored to releaseupdate scripts in dynamics ax 2012 r2
What is “old sys” exactly and why would I receive errors in 2012 because of a missing Macro?
How to filter records in line grid based on selected record in header grid?
Dynamic linking gets cleared when inserting new records
Box::info showing “refreshEx”
How to filter lookup values on a dialogfield in Report Dialog based on another dialogfield in AX 2012 AOT reports?
Adding scrollbar to a Group in AX 2012 form
Table query inconsistent
AX2012 Sales Order Creation through AX Classes
How can I loop over Tables which contain specific characters in their AOT name and delete the data?
Having button that runs code, but doesn't submit data to (or validates against) table
Where are Duties (table name) stored in AX?
Advanced query range

Categories

HOME
url-redirection
azure-stream-analytics
design-patterns
jmeter
ns-3
jmx
3d-reconstruction
odoo-8
nfs
flume
rcloud
accessibility
qpython
augeas
little-proxy
resultset
activecollab
supervisor
parameter-passing
screen-readers
package.json
rubymotion
tiki-wiki
bulletphysics
dotspatial
panoramas
mustache
mockjax
quickfixj
catch-unit-test
contacts
sharding
slacktextviewcontroller
sql-delete
reason
imagenet
reactivekit
release
subclipse
glm-math
apollostack
signal-strength
phpdbg
jquery-ui-draggable
posixct
context-switch
wpas
spring-data-couchbase
oracleclient
skin
sundials
swingworker
reachability
gets
actor-platform
udpclient
angular-ui-typeahead
ikiwiki
thread-sleep
custom-errors
boomerang
ess
dock
iced-coffeescript
teamcity-9.1
infosphere-spl
execve
primitive-types
device-tree
imagefilter
raygun
encryption-asymmetric
named-parameters
template-deduction
verold
functional-java
jjaql
buffering
multiautocompletetextview
spring-3
ie8-compatibility-mode
cocoalibspotify-2.0
css-reset
octal
onload-event
server-administration
os.system
faye
subgraph
xui
inline-formset
diagrams
office-2007
cfwindow
cldc
escrow
perl5.12
blind

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App