
I'm running an experiment to access all the values of rows in a repeating section. I've found numerous examples showing how to iterate over the items in the repeating section and access the row id's, but I'm having trouble implementing it as it doesn't appear to ever execute. Using this basic call to test it out, the code in getSectionIDs never runs.
for the test, i have a checkbox that runs when changed and updates a text input. the input updates jsut fine when the change function is called, but it never reaches the line that updates the text for the input inside the getSectionIDs call. I have the code to iterate over the repeating section items once getsectionid's executes, but it never seems to (hence this test to confirm that. What am I doing wrong here?
on("change:listitemscheckbox", function() {
let weaponlist = "Start function. ";
getSectionIDs('weapons', function (ids) {
weaponlist = weaponlist + ' Run code for section IDs.';
});
setAttrs({['theweaponstring']: String(weaponlist)});
});