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

Clients seem to be running old (buggy) code after XPO project import
Number sequence AX 2012
SSRS MS words report with page break
How can you get a detailed error descriptions in Dynamics AX?
How to get the length of an array?
X++ loop through lines in grid control
Concatenating row values in x++
How do you access a macro in the AOT macro node?
How can I set the Backgoundcolor of an AX2012 Action Pane Button
How to Edit address using X++ in AX 2012
Number sequence issue Ax 2012?
Find code that's running in a Batch Job
What is the _isMexican boolean for in the Global::Checkpower method?
AlwaysOnTop property not behaving properly
Boolean AND logic in Microsoft Dynamics AX 2012 AIF QueryCriteria
Table: PrintMgmtSettings Field: Printjobsettings(Blob)

Categories

HOME
notepad++
facebook-oauth
time-complexity
ggplot2
forms
gpu
nunit
pyqt
error-handling
owl-carousel
ms-access-2016
nstableheaderview
teechart
qpython
little-proxy
openstreetmap
reactive-programming
ibeacon-android
redis-sentinel
do-while
searchview
asp.net-mvc-viewmodel
html5-appcache
inno-download-plugin
object-storage
expressionengine3
xcode-ui-testing
event-flow
git-squash
instantiation
reactjs.net
dm-script
password-protection
recurrent-neural-network
mongoose-schema
kill
clang++
optimizely
openrasta
jquery-ui-draggable
wcftestclient
datamaps
insight
reindex
compiler-design
truezip
opengl-4
android-testing
reshape
vibrate
django-1.10
gets
grails-plugin
macaulay2
ng-grid
tooleap
data-protection
pushbots
piracy-prevention
jaunt-api
vhosts
ess
viola-jones
skspritenode
mirror
uncaught-typeerror
structuremap3
deform
teaspoon
trdion2011
template-deduction
rcaller
gnumeric
fpdi
menubar
android-audiorecord
accesscontrolexception
c++builder-xe5
epiceditor
font-awesome-4.0.0
apache-abdera
boost-msm
database-create
kqueue
user-tracking
catransform3d
winmain
tmx
svk
silent
sifr
spread
cldc
windows-identity
xpsdocument
todos
localizable.strings

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App