web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

is it possible to get the recid count in Update Recordset statement ?

(0) ShareShare
ReportReport
Posted on by

is it possible to get the recid count in Update Recordset statement ?

Please find the below statement

update_recordSet _maLineReviewReportTmp
setting loccount = _retailstoretable.RecId
join _invSum1 where _invSum1.ItemId == _maLineReviewReportTmp.ItemId
&& _invSum1.AvailPhysical > 0
join _invdim2 where _invdim2.inventDimId == _invSum1.inventDimId
&& _invdim2.InventLocationId != ''
join _maInventBusinessUnit where _maInventBusinessUnit.InventLocationId == _invdim2.InventLocationId
&& _maInventBusinessUnit.z_BusinessUnit == "1"
join count(RecId) from _retailstoretable where _retailstoretable.StoreNumber == _maInventBusinessUnit.StoreNumber;

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    237,795 Most Valuable Professional on at

    If you mean the number of update records, use rowCount() method.

  • Jegan Profile Picture
    on at

    No Matrin ,

    I'll get recordcount value  from the below select statement  and update the count value in base temp table

    Select _invSum1 where _invSum1.ItemId == _maLineReviewReportTmp.ItemId

    && _invSum1.AvailPhysical > 0

    join _invdim2 where _invdim2.inventDimId == _invSum1.inventDimId

    && _invdim2.InventLocationId != ''

    join _maInventBusinessUnit where _maInventBusinessUnit.InventLocationId == _invdim2.InventLocationId

    && _maInventBusinessUnit.z_BusinessUnit == "1"

    join count(RecId) from _retailstoretable where _retailstoretable.StoreNumber == _maInventBusinessUnit.StoreNumber;

    for the above logic is it worked

  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at

    You cannot do aggregation directly in an update_recordset.

    You can convert the aggregated table on your RetailStoreTable to a View with a Count field, and that can be joined in the set-based operation without any problems.

  • Jegan Profile Picture
    on at

    Hi Vilmos,

    Please share the some examples

  • Martin Dráb Profile Picture
    237,795 Most Valuable Professional on at

    With which part do you need some help? For example, do you know how to create a view? If you do, building an example for you would be a waste of time, because it wouldn't tell you anything new. If you tell us what you need, we can address the right problem.

  • Jegan Profile Picture
    on at

    yes, I know how to create the view

  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at

    You could find examples yourself easily with your favorite search engine easily by punching in "ax create view with sum" keywords or similar, please do not be lazy.

    ajstudi0.blogspot.hu/.../microsoft-dynamics-ax-views.html

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans