We recently made a custom button to apply a function to multiple records. At first we ran into some hiccups making it, because selecting multiple records would pass in all their values as a string, but we figured out how to fix it, by doing the following:
name_list = names.toList("III");
After delimiting the names using pipes, we were then able to loop over the names of the list into an array.
However, my question is how to deal with it when I'm taking multiple fields from the selected records.
So for instance, let's say I select a bunch of records, and I need their phone numbers, names, and company names. I mass select the record, and run the following code to split those fields into their respective lists.
name_list = names.toList("III");
phone_number_list = phone_numbers.toList("III");
company_list = company.toList("III");
So now that I've constructed 3 separate lists, I need to figure out a way to simultaneously loop over each one. In Python for instance, I would be able to do this using a "zip" method - I wonder what's the equivalent for deluge.
To be clear, what I want my loop to do is - when it does its first iteration, it selects the 1st value from each of the three lists. When it does its 2nd iteration, it selects only the 2nd values from each of the three lists, etc.