x++


group by clause in X++


Another weird question, is it possible to specify an expression in a group by clause in X++? basically, how can I do the following:
while select InventDim **group by substr(InventDim.inventBatchId,1,3)**
join InventDimId from InventTrans
where InventTrans.inventDimId == Inventdim.inventDimId && InventTrans.ItemId == _itemId
{
MyQty += inventTrans.Qty
}
thanks for your help
regards,
Thomas
No, it's not possible - see Select Statement Syntax to understand what is allowed and what isn't.
You have to use some workaround, typically to fetch data without grouping and process them by your application code.

Related Links

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)
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

Categories

HOME
algorithm
cobalt
paraview
deep-learning
awk
pyqt
owl-carousel
javacc
tivoli
rds
parameters
web-hosting
settings
pkcs#11
teechart
qpython
okhttp
appcelerator-studio
x-cart
angular-dart
supervisor
intercom
code-generation
renjin
android-intent
libusb
azure-powershell
smartclient
dynamically-generated
surveymonkey
fable-f#
spotipy
userdefaults
eviews
send
mobx
xbox
postback
mockjax
r-grid
gnat-gps
activexobject
fossil
numpy-broadcasting
swagger-php
magento-1.9.2.4
parse-tree
google-earth-engine
railstutorial.org
google-data-api
comparison-operators
preloader
congestion-control
bindingnavigator
http-request
pom.xml
openal
proget
robomongo
android-testing
seq
py2neo
rxtx
renaming
slackware
centrifuge
signalr.client
mta
wso2developerstudio
gogs
simevents
shopping
html-to-pdf
fink
libav
aspen
ascii-art
inf
sapi
tfs-workitem
skspritenode
omnifaces
j-security-check
at-job
raygun
wxformbuilder
gae-quotas
hibernate-entitymanager
printdialog
cmmi
ui-select2
nebula
facebook-timeline
argouml
intersect
pdfviewer
fragmenttransaction
uimanageddocument
jdb
koken
workflow-services
android-holo-everywhere
unattended-processing
ie-compatibility-mode
office-2007
jqueryform
dot-emacs
appliance
commercial-application

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