How To Process Selected Records?

  • 2
  • 2
  • Question
  • Updated 3 years ago
  • Answered

I have a report displayed and i would like to select a subset of these records and do something with them. How can I process just the selected records?

Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 29,664 Points 20k badge 2x thumb

Posted 3 years ago

  • 2
  • 2
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 29,664 Points 20k badge 2x thumb
Here is how you do it:

Table 1 List All - Process Selected Records
https://haversineconsulting.quickbase.com/db/bkfwuwx2p?a=td

Randomly select records by clicking on the checkbox and then press the "Process Selected Records" button. You will see two alerts displayed with the first alert displaying the rids of the selected records and the second alert displaying a query which would return the data associated with the selected records. Depending on you requirements the selected records can be manipulated as a unit perhaps setting specific fields to specific values or otherwise handling the subset of records. This interface is similar to the way you can perform actions on email messages within an email client and has a tremendous number of uses. 

Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=462

If you are curious about the ridsChunked variable within the code this is to handle the situation in which you select more than a 100 records from the list (impractical but possible). Since QuickBase can only handle a query with a maximum of 100 clauses in it you have to group the rids into an array of arrays where the inner array has at most 100 entries.

I have to think of a snappy name for this new technique. How about  the "I Want to be Selected" technique?


https://www.youtube.com/watch?v=1i4EnjRKVQw
Photo of rocketc

rocketc

  • 694 Points 500 badge 2x thumb
Dan, This is very cool thank you for sharing. Question: I would like to use this same technique to help me manage duplicate records within a quickbase table.....I have a [DupID] field in my Table....that I Group By within a quickbase view.......I also use 3 checkbox fields to help me manage my dups [Master Record], [NonMasterDup] and [NonDup]..........this view is very user friendly in standard View Mode (not so friendly in edit view mode).....it would be great to have the ability to "edit" (select one of the 3 check boxes for each record within a duplicate group) and then select the Process Select Records button.....

Is this possible?

Thank you
Photo of eduardo

eduardo

  • 40 Points
Dan how can  2 or more QBU_Button class='Vibrant Success'>Process Selected Record
be inserted in the report.

Trying to perform more than one action, such as group records, Ungroup records, take one record out of the group etc.

This technique & the scooby doo rock!!!
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 29,664 Points 20k badge 2x thumb
var markup = "";
  markup += "<tr>";
  markup += "<td><a href=# id=QBU_Button1 class='Vibrant Success'>Process Selected Records 1</a></td>";
  markup += "<td><a href=# id=QBU_Button2 class='Vibrant Success'>Process Selected Records 2</a></td>";
  markup += "</tr>";
  $("table[qbdbid=" + dbidTable  + "] tr:first").before(markup);

>This technique & the scooby doo rock!!!

Yes, they do but Gimme All The Datas is even better:

https://quickbase-community.intuit.com/questions/1319944-what-is-gimme-all-the-datas
Photo of Tribs

Tribs

  • 20 Points
Hi Dan - I have used your iol technique in forms but cannot figure how to add them to table dashboards. can you give me some pointers on how to put code in Table Dashboards.
Photo of Tribs

Tribs

  • 20 Points
Nevermind - I figured it - the code is actually part of the column selected in the report.