I'm attempting to set the calculation order of a couple fields and I want them to always be last. I know I can set the .calcOrderIndex of a field but that only works if I know what field will be before my "last" field. The way the document is set up is there is a button that adds a sheet from a template, which has N amount of fields on it, I want to always set the calcOrderIndex of "totalAmount" (which is always on the first page) to the last spot.
I thought the best way to do this would be to get the calculation order array, but I can't seem to find out how to access this array.
Any advice will be helpful, maybe I'm looking at this the wrong way, thanks in advance!