Shawn Pelletier 27.Feb.13 09:20 AM a Web browser Applications Development 6.5.4 Windows XP
I currently working on an agent that will loop through a view, grab all documents with a certain key in an assigned field and will create an array with the invoice amount of that document. I then want to sum all the values in the array. I know what you're thinking, why don't I just use the totals function in the column of the view? well, I want to perform a number of mathematical function on the total after I have it. I need help with the logic and perhaps need direction with the correct statements to use. Here is what I have so far. I'm only posting the portion of code I'm unsure about, if you need to see all of it, that's not a problem......
'Loop through Document Collextion
Do While Not (RequestDoc Is Nothing)
'Grab data from requested By Column
Set RequestedBy = RequestDoc.GetFirstItem("Requested_By")
Set DC = RequestView.GetAllDocumentsByKey(RequestedBy.Text, True )
'If Requested By = CVPS
If RequestedBy = "CVPS" Then
'Here is where I want to loop through all the documents, grab the value in the invoiced field, add it to an array, and at the end of the array do all my math functions
I was thinking I need to use a Forall then nest a redim, but I'm not sure. I know I'm missing other functions as well. Please, any help would be appreciated! thank you!
I have searched through this forum for other threads that would help give me direction.