I've tried to solve your problem and the only way that it works for me is keeping the original order of the two-column table, apparently, the vector generated by SetRawInputFieldVector is ordered under the original charge order, so, you can't allow the user make interactive sort on the table or show a interactive sort table and execute the script on a hidden table.
Check out my example, the only point I don't understan was the F(Key), what you mean with the F() function?
I hope this works for you.
SetRawInputFieldVector.qvw 114.5 K
Thank you for that clear illustration of the SetRawInputFieldVector. My problem is that the ordering of the values seems non-deterministic in my full QlikView document, perhaps because the values are connected to other tables.
The next step is mine, and I will try to put together my own sample QlikView document to illustrate the problem.
As an aside, I am not sure that this solution will scale well. I did some testing of the SetInputFieldValue method for setting the InputField values in a macro, and although it worked and was slow, as soon as I got to over ten thousand values then my QlikView memory footprint grew from ~2GB to max out on my computer at 8GB. Therefore the warnings about InputFields and the affect on performance are probably all valid, and using them to store temporary calculations instead of using a partial reload will not work for us.
My reference to F() just means any function. In actuality we have a complex aggr() function with set analysis that takes a long time to complete. I should have been more specific in my original posting.
Thank you again for your response!