Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Getting the sum of a specific attribute in a node list

(0) ShareShare
ReportReport
Posted on by 1,695

I'm trying to get the sum of the @valueOf  attribute from a node list. There can be x number of records

if for instance there are three records , my code below only gets the first record 3 times

                                        Dim _values As XmlNodeList = _temp_xml_Doc.SelectNodes("/BACSDocument/Data/ARUDD/Advice/OriginatingAccountRecords/OriginatingAccountRecord/ReturnedDebitItem")
                                        Dim Counter As Integer = 0
                                        For Counter = 1 To _values.Count
                                            Dim x As XmlAttribute = _temp_xml_Doc.SelectSingleNode("/BACSDocument/Data/ARUDD/Advice/OriginatingAccountRecords/OriginatingAccountRecord/ReturnedDebitItem/@valueOf")
                                            _totalvalue = _totalvalue + CDec(x.Value)
                                        Next


*This post is locked for comments

  • Aric Levin Profile Picture
    30,188 Moderator on at
    RE: Getting the sum of a specific attribute in a node list

    Hi Pete,

    How is this question associated with Dynamics CRM?

    Have you tried msdn or visual studio forums?

    social.msdn.microsoft.com/.../home

    developercommunity.visualstudio.com

    Hope this helps

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,865 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,723 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans