Discussions

Expand all | Collapse all

Button on Report Row to Set a Value in a Field

  • 1.  Button on Report Row to Set a Value in a Field

    Posted 4 days ago
    While in a report, is it possible to set the value of a field based on a button click?  For example, one of my users is tasked with reviewing field values and prioritizing each record. Rather than traversing through each record via a form, I'd like to present the data in a report with a cell that contains buttons (ex: High, Medium, Low) and when the button is clicked, I'd like the value in the Priority cell to be set accordingly.  I don't want to use grid edit for this since his job is to only set priority and it would be fastest if he could just click, click, click through the report and have the priorities be set as he moves from row to row.

    ------------------------------
    Dawn Quitschau
    ------------------------------


  • 2.  RE: Button on Report Row to Set a Value in a Field

    Posted 4 days ago
    Yes this is pretty easy to do except that with the recent deprecation of JavaScript becomes much more tricky to not lose your place on the report. Would you be OK with a solution where the user clicks to do the update and the page refreshes?

    Other option I just thought it would be to create three checkboxes for high medium and low maybe called 

    [Update High] [[Update Med] [ Update Low]

    Then create a pipeline that would see those checkboxes being checked when you finally do the grid at save and individual pipeline occurrences with fire to update your real [Priority] field and clear the checkbox field.  That would be a super fast way to do the update.

    If the user is perhaps working on a report where the only records on the report or records to be prioritized and it may not be so bad to refresh the report after each click because then the report will just keep getting shorter and shorter each click until all the records are prioritized.  If you prefer that solution I can help you with the formula.

    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------



  • 3.  RE: Button on Report Row to Set a Value in a Field

    Posted 3 days ago
    Does the pipeline solution require the user to be in grid edit (you mentioned "grid at save")?  If so, I would just have them set the priority via the Priority drop-down using grid edit.  I was hoping to offer them a quicker solution with the buttons - was hoping for some type of in-place update, where the Priority field was populated immediately with the click of a button.  I'd like to give the page refresh a try and would appreciate help with the formula.

    ------------------------------
    Dawn Quitschau
    ------------------------------



  • 4.  RE: Button on Report Row to Set a Value in a Field

    Posted 3 days ago
    OK, try this as a formula URL button

    var text URL = URLRoot() & "db/" & dbid() & "?act=API_EditRecord&rid= & [Record ID#]
    & " &apptoken=xxxxxxxxxxxx" //optional if you have app tokens enabled.
    & "&_fid_99=High"; // stuff HIGH into the field id # 99 

    var text RefreshPage = URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl();

    $URL
    & "&rdr=" & URLEncode($RefreshPage)

    // after doing a URL we need to land the user somewhere.  In this case we are refreshing the page.



    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------



  • 5.  RE: Button on Report Row to Set a Value in a Field

    Posted 3 days ago
    I got it working, Mark.  Thanks!  :)

    ------------------------------
    Dawn Quitschau
    ------------------------------