Forum Discussion

ElenaLarrabee1's avatar
ElenaLarrabee1
Qrew Captain
4 years ago

URL button to check/uncheck a checkbox

Hi everyone, I'm trying to create a URL button that just checks or unchecks a checkbox (depending on status of the checkbox) so that I can trigger a pipeline. I just can't get it to change the checkbox. I'm sure I'm missing something incredibly obvious here... 

var text NewCheckboxValue = If([Send to Quickbooks Trigger]=true,"0","1");

URLRoot() & "db/" & "DBID" & "?a=API_EditRecord&rid=" & [Record ID#] & "&_fid_312=" & $NewCheckboxValue &  "&apptoken=" & "XXXX"​

And then I've also been trying to use a=doredirect to refresh the current form page but I haven't quite worked that out either. Thank you!!!

------------------------------
Elena Larrabee
------------------------------

3 Replies

  • Try this and see if it helps:

    var bool NewCheckboxValue = [Send to Quickbooks Trigger]=false;
    
    URLRoot() & "db/" & "DBID" & "?a=API_EditRecord&rid=" & [Record ID#] & "&_fid_312=" & $NewCheckboxValue &  "&apptoken=" & "XXXX"​​


    ------------------------------
    Blake Harrison
    bharrison@datablender.io
    DataBlender - Quickbase Solution Provider
    Atlanta GA
    404.800.1702 / http://datablender.io/
    ------------------------------
    • ElenaLarrabee1's avatar
      ElenaLarrabee1
      Qrew Captain
      Thank you for the response! It still isn't updating the checkbox... The URL looks right when I hover over the button too, it's showing that fid312=1 when the box isn't already checked. I'm not sure why it's not actually editing the record.

      ------------------------------
      Elena Larrabee
      ------------------------------
    • ElenaLarrabee1's avatar
      ElenaLarrabee1
      Qrew Captain
      I realized what I was doing wrong! I wasn't specifying the the table by its alias, I was just including the actual DBID. I didn't realize that wouldn't work.

      ------------------------------
      Elena Larrabee
      ------------------------------