I'm not trying to be vague, but this tech is patent pending so I am not allowed to just blurt it all out.
I have this in the main repeat loop:
Code: Select all
##=========================================================
add 1 to varMonthCount[(ccMonthDecrypted)]
put ccMonthDecrypted & varMonthCount[(ccMonthDecrypted)] & cr after field "fldInfo"
##==========================================================
I then used the code you kindly suggested to create the table data.
I thought the main repeat loop array, varMonthCount already has all the data in it. The field "fldInfo" is there to just show me what's
going on and it clearly shows a month and a number (though not sure why some are a 1 and sometimes the number is a 2 or 3.
Think of this like a normal database. Assume I logged in and am trying to grab some data. The table in question has 403 records and I am trying to query the "Month" column. Every record has a month between January and December, depending on when the record was created.
Don't assume I am using a database language like SQL - i'm not. Just imagine it's a database.
What I am trying to do is make a dashboard and every time the user opens it up (openCard) it tallies all records (since new records will be added eventually) and provides statistics - in this case, the number of accounts per month. It is assumed that if the month exists, it must contain a account, so all we have to do is count the number of months and put that into a number. In the table and associated bar chart, the months are obvious, so no need to dwell on those. However, the second column, the Accounts column, is the one we are trying to fill with data and therefore the new bar chart statistics.
The data is encrypted and so has to be decrypted before any processing. It is also encoded/decoded with UTF-8 on the fly. In this case, the
variable (column) in question is ccMonthDecrypted. That variable holds the month as text. Putting the result of that variable in a text box
(put ccMonthDecrypted into field "fldInfo) confirms that the decrypted text is indeed a readable Month. HOWEVER, when I try to use what
I consider to be a very normal operation - use a for/next operation to see if the variable is a certain month and if so, add 1 to a counter, it fails totally.
This is my quandry.
Now, it was suggested with the code above that I use that in the repeat loop and that fills up varMonthCount[(ccMonthDecrypted)]
So, after the repeat loop, I wish to reconstruct the array and then format the table data to work with the table (field "tblAccountMonth").
It has now been suggested that I put that into another repeat loop for the array, is that correct?
Mike