Forum Discussion

RohitAgarwal's avatar
RohitAgarwal
Qrew Cadet
8 years ago

Is it possible to fire web hook on click of Button ?

I have a button(Formula URL) and I want to fire Web Hook that I have created in my table. Is it possible to fire it on click.
  • If you make a URL formula button toggle a checkbox field, then, then you can trigger the Webhook off a change in that field.  Post back if you need help building the button.
    • PaulVorster1's avatar
      PaulVorster1
      Qrew Cadet
      Hi There, can you maybe assist with showing us how to build that button? Can this web hook be used with multiple conditions?
    • QuickBaseCoachD's avatar
      QuickBaseCoachD
      Qrew Captain
      Here is an example of a URL formula button which simply Toggles a checkbox field between true and false


      var bool NewValue = not [Checkbox Field]; // this makes the NewValue the opposite condition of the checkbox current value


      var text URL =
      URLRoot() & "db/" & Dbid () & "?act=API_EditRecord&rid=" & [Record ID#]
      & "&_fid_55=" & URLEncode($NewValue);

      "javascript:" &
      "$.get('" &
      $URL &
      "',function(){" &
      "location.reload(true);" &
      "});" & "void(0);"


      // the above presumes that the field ID for the checkbox field is fid 55.
    • QuickBaseCoachD's avatar
      QuickBaseCoachD
      Qrew Captain
      Note also that an Action is way way easier to use than a Webhook, so if you have a choice between an Action and a Webhook, use an Action.  An Action is limited to just Adding records or editing records.