Is there a way to prevent Appian from sorting an integer array when it is autosa

Is there a way to prevent Appian from sorting an integer array when it is autosaving. Basically this happens in a multiple checkbox field. the choiceValues are 1 thru 12 and I am saving that to a local list array. I want to get the value of the last item that is checked in this checkbox field. The problem arises when there are many options selected randomly and then this saveInto sorts the values that are getting saved into this local variable and so the last value that is checked gets sorted and pushed to somewhere else in the array. The best I could do was to get the last item that is either checked or unchecked but I could not get the one that got checked before I unchecked something. This is the code below:
load(
local!lastValue,
local!tempValues:{},
local!compareValues:{},
local!multipleChoices:{},

with(
....formlayout and all that stuff .......

a!checkboxField(
label:"checkbox",
choiceLabels:index(local!display, "VALUE", {}]),
chioiceValues:...

OriginalPostID-144185

OriginalPostID-144185

  Discussion posts and replies are publicly visible