Is there any way to create a conditional button (Preferably Formula Text, but URL will work too, Text just looks nicer).

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered
Is there any way to create a button (Preferably Formula Text, but URL will work too, Text just looks nicer) that would change a status field based on a condition? So the button would change a status field based on checkboxes. If Checkbox A is true, then change status to _____, if checkbox B is..... etc. I figured I would pop in If statements but I don't really know if that is possible or how to format it if it is. 
Photo of Manny De La Cruz

Manny De La Cruz

  • 940 Points 500 badge 2x thumb

Posted 2 years ago

  • 0
  • 1
Photo of Matthew Neil

Matthew Neil

  • 31,438 Points 20k badge 2x thumb
You can do it just as you do a normal 'If' or 'case' formula.

If([Checkbox A]=true, "Button 1", "Button 2")

If([Checkbox A]=true, "<a class=\"Vibrant Primary\" href=\"https://ctc.quickbase.com/db/bmqu5ffji?a=showpage&pageid=87\">Return To Dashboard</a>", 
"<a class=\"Vibrant Primary\" href=\"www.google.com\">Go to Google</a>")
Photo of Manny De La Cruz

Manny De La Cruz

  • 940 Points 500 badge 2x thumb
Awesome! Thank you so much! 
Photo of Manny De La Cruz

Manny De La Cruz

  • 940 Points 500 badge 2x thumb
Also, appreciate you pulling the code from my previous post, amazing (:
Photo of Manny De La Cruz

Manny De La Cruz

  • 940 Points 500 badge 2x thumb
Quick question, how would I format this to include editing a field? Would I just add and API call for editing a record and specify the fields?
Photo of Matthew Neil

Matthew Neil

  • 31,438 Points 20k badge 2x thumb
Just change the URL in the href='API_EditRecordURLCode'

Do you have an existing edit record URL to work with?