I need help on working with dataset, I have a dataset which consist one of the column as Index to which I want to pass alternatingly value 1 ( each row in Index column would be 0,1,0,1,0,1…) so when ever user makes a new entry it will automatically assign value either 0 or 1
Intention is I will be using a template in a template repeater and each template text will either be blue or white depending on 0 or 1 pass through Index Column template parameter.
I have tried following script but i only updates last index as shown in snapshot, I doubt that issue is with system,dataset.toDataset instruction, its not getting executed for each value of (i). I am a newbie in python programming and just taking baby steps.
Note : pls ignore Value 2 in last dataset entry it was old snap latest is 1 as sen in scripting snap