Forum Discussion
_anomDiebolt_
8 years agoQrew Elite
OP>How can I add an activity (the same activity) to a sorted/filtered list of contacts?
I think the OP is asking how to add child records to the currently selected set of filtered records being displayed. This is how I would proceed:
You need to use the IOL technique (or other injection technique) and introduce a button into the head of the form as shown here:
Process Selected Records
https://haversineconsulting.quickbase.com/db/bkfwuwx2p?a=td
All we need to do is get the button introduced - we will not be using the checkboxes shown as the selection mechanism in the above demo. Rather we will use the native dynamic filters to select a reduced set of records that you want to add the activity to.
Now after a user filters the displayed records and the button is clicked run a script like this and grab the rid attribute QuickBase places on each row of the table row results:
Now we know the complete set of [Record ID#]s for which the user wants to add some child record and we can call API_AddRecord or API_ImportFromCSV to populate the child records.
I should mention that you can paste this script into the console of some filtered report and an array of rids will be logged to the console reflecting the filtered set of records.
I think the OP is asking how to add child records to the currently selected set of filtered records being displayed. This is how I would proceed:
You need to use the IOL technique (or other injection technique) and introduce a button into the head of the form as shown here:
Process Selected Records
https://haversineconsulting.quickbase.com/db/bkfwuwx2p?a=td
All we need to do is get the button introduced - we will not be using the checkboxes shown as the selection mechanism in the above demo. Rather we will use the native dynamic filters to select a reduced set of records that you want to add the activity to.
Now after a user filters the displayed records and the button is clicked run a script like this and grab the rid attribute QuickBase places on each row of the table row results:
var rids= $("table.searchResults tr:[canview=true]").map(function() {
return $(this).attr("id").substr(3);
}).get();
console.log(rids);
Now we know the complete set of [Record ID#]s for which the user wants to add some child record and we can call API_AddRecord or API_ImportFromCSV to populate the child records.
I should mention that you can paste this script into the console of some filtered report and an array of rids will be logged to the console reflecting the filtered set of records.