Skip to main content
Solved

Delete Formula Button Error

  • March 18, 2025
  • 0 replies
  • 167 views

Forum|alt.badge.img+5

Hello,

I have a URL Formula field I created that I'm trying to use as a Delete button on one of my tables, but I keep getting this "A formula cannot end with an assignment to a variable declaration." error message when I try saving it.

The formula I am using is this:

var text Delete = URLRoot() & "db/" & Dbid() & "?a=API_DeleteRecord&apptoken=*XXXXXXX*=" & [Record ID#];

Does anybody know what I should change? Please let me know.

Best answer by MarkShnierYou

Sure, I can help.  Where do you want to redirect the user to after the delete?  Perhaps that table home page?

 

If so, try this

 

var text Delete = URLRoot() & "db/" & Dbid() & "?a=API_DeleteRecord&apptoken=*XXXXXXX*=" & [Record ID#];

var text TableHomePage = URLRoot() & "db/" & dbid() & "?a=td";

$Delete

& "&rdr=" & URLEncode($TableHomePage)

 

 

MarkShnierYou
Forum|alt.badge.img+22
  • Quickbase Alumni
  • Answer
  • March 18, 2025

Sure, I can help.  Where do you want to redirect the user to after the delete?  Perhaps that table home page?

 

If so, try this

 

var text Delete = URLRoot() & "db/" & Dbid() & "?a=API_DeleteRecord&apptoken=*XXXXXXX*=" & [Record ID#];

var text TableHomePage = URLRoot() & "db/" & dbid() & "?a=td";

$Delete

& "&rdr=" & URLEncode($TableHomePage)