Forum Discussion

RachelJones's avatar
RachelJones
Qrew Cadet
8 years ago

How can I create an uncheck all function for all records in a particular report?

I have created a "star" checkbox/magic button in each of my project records. From the report view, I can click the star image to star or unstar a project (on the backend it checks/unchecks a checkbox labeled "star").

My users would like the ability to unstar all projects in a particular report, like an uncheck all kind of functionality. I cannot figure out how to create a button that would edit multiple unrelated records in one go from the report view.
  • I suggest Grid Edit.  Check the first checkbox.  Click the top of the column to highlight the whole column.  Right click to Fill Down.  Save.
  • So I would need a different report for view and grid edit then, because the star field people actually use is a formula-text field with html. I was trying to hide the actual checkbox from the user. Plus we may have over 100 records to update in one go. Not sure that is the *best* solution...
  • You don't need another report if you are willing to put the checkbox on the report.  if they just want to say click a few of them they can use your button for the one by ones.  But then they have the option to use Grid Edit for many. Note that when you click the column it highlights all visible records on that grid edit report, so its fast to highlight many records.

    One downside could be that I think that # of records you see in grid edit depends on how many columns you have.  So users may think that they have grid edited them all, when in fact they are just on page 1 of 2 pages of grid edit. 

    There are other methods ot mass update, but your issue is that  your report filers sound pretty random, so how do we identify which records need to be updated by a more advanced process?
  • OK, I can get more specific with my business case. Project Managers are going to be filtering on active projects based on the Project Status field. Furthermore they may apply a filter where project manager = <current user>. Prior to the weekly meeting, they will be starring the projects that need to be discussed. Before the next meeting, they want the ability to clear the slate (unstar all) before starting over.

    So essentially I have just 2 report views where the uncheck all function would be normally used. Does that make it possible to create some sort of button that will update many records? Perhaps on a dashboard?
  • So, is this the ask?

    1. A button to clear all.
    2. A button to clear "MY" Projects.
  • OK, lets do this step by step.  We can get to a dashboard button later.  Walk before we run.

    We can create a saved table to table import and run it to mass update records.

    1. Make a formula checkbox field in your projects table  called [False] with a formula of false.

    2. Go to the table home page and then to import export and make an import form another table.  Navigate to your same table that you are already on, as we are going to import the table into itself.  Use the option to "Merge" as we do not want to create new projects.  Set the merge field to be [Record ID#].

    3. You can add in a filter where the project manager is the current user.  nie "My Projects".  if it does not offer up that as a choice, you will need ot create a formual checkbox field and filter where that formula fie3ld [is this MY Project] is checked.

    3. Deselect all the fields which are being copied to Do Not Import.  It does not actually hurt to map the same value into itself, but I prefer to do that if there are not too many fields.

    4. For the checkbox field that you want unchecked map FALSE into it.

    5. You can save the Import and observe its ID# in the URL.  It will be ID=10 if it is the first one for that table.

    6. You can run the import manually if you want to test it.

    7. Make a Report of My Projects.  Well you probably already have that report.  Lets say it is qid=7.

    8 Make a formula URL button to mass update MY projects ot false and redisplay the report.

    The formula will be
    var text ClearMyStars = urlroot() & "db/" & dbid() & "?act=API_RunImport&ID=10";
    var text DisplayMyProjects = urlroot() & "db/" & dbid() & "?a=q&qid=7";

    $ClearMyStars
    & "&rdr=" & urlencode(DisplayMyProjects)

    // the code above says to run the import and then run the report.

    Put the button on the My Projects report and see if it works.

    Once you get that working, you can make a similar URL  formula button to clear all flags ands not just My flags.  

    I am not using apptokens in my examples, so either you will need to disable application tokens in your app properties or add in a line ot the URL formulas like 

    & "&apptoken=xxxxxxxxxxxxxxxx
  • Thank you that worked!

    There was a missing $ before DisplayMyProjects, but once added, the formula worked flawlessly.

    I never realized you could access a saved table to table import from a URL formula. Thank you! 

    Now, is there any good way to display this as a single button rather than 1 button per row? That's why I was thinking  about putting it on some sort of homepage.
  • Good for you!  Well done.

    So what you can do now is to take than URL formula field button and temporarily remove the link text ands uncheck so it does not show as a button.  You will then see a crazy long URL on a record or a report.

    Copy that URL to your clipboard and make a URL dashboard button and paste in that code.