I think the built in selector is making your life harder because the information that contains is 1,2,3,4,5. You then need to map 3 to the ID of your 3rd row.
So, if you check row 1 and 3, on submit, the row selector will have two rows, one with value of 1 and with with value of 3.
I would remove the selector, use and ID column that I can change to be Simple Checkbox (or whatever value you can use to uniquely identify it). Or add your own apex_item.checkbox(n, ID) to your SQL.
Then your loop on apex_application.g_f01.count (if that's the checkbox column) will only contain the elements checked and their values will be the ID that are checked.
All that said, here's a useful example from Denes Kubicek
Hope this makes sense
Message was edited by: jrimblas Added link to Denes example page
The problem is not with the loop. It works perfectly. The problem is that it occurs for as many rows as are selected. I worked around the problem with a global variable that I set and make sure to only run the loop once. Bit inefficient but still learning the inner workings of APEX
1 person found this helpful
Yup, sounds like a hack or band aid to me. I know we could have figured this out, but I'm glad you're happy.