How to tick and untick a box with a button

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered

Hey All,

I have a button on a report that is quite simple, it ticks the completed box.  However, I'm wondering if the formula can be amended so that the completed button can tick OR untick the box (so that, in case you clicked completed but didn't actually complete the task, you can click the button again to untick).

Here is the formula

URLRoot()& "db/" &Dbid()& "?a=API_EditRecord" & 

"&apptoken=d8wv68d97fw4dbi4y35mpwivc3"&

"&rid=" & [Record ID#]&

"&_fid_9=True" & 

"&rdr=" & URLEncode(URLRoot() & "db/" & "bjfwhnfx8" & "?a=dr&rid=" & [Related Checklist])

I'm thinking this is just an if formula, but not quite sure.

Thanks!

Photo of Michael

Michael

  • 10 Points

Posted 3 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 59,768 Points 50k badge 2x thumb
No problem

var text NewValue = if(My Checkbox field]=true,"0","1");


URLRoot()& "db/" &Dbid()& "?a=API_EditRecord" &

"&apptoken=d8wv68d97fw4dbi4y35mpwivc3"&

"&rid=" & [Record ID#]&

"&_fid_9=" & $NewValue &

"&rdr=" & URLEncode(URLRoot() & "db/" & "bjfwhnfx8" & "?a=dr&rid=" & [Related Checklist])


I have used a formula variable to keep the formula more tidy. http://www.quickbase.com/user-assistance/Default.html#formula_variables.html