Skip to main content
Question

URL Formula not working as needed

  • June 1, 2020
  • 0 replies
  • 21 views

I have a checkbox that will conditionally check several other checkboxes when checked.  I am trying to add a button from to perform this action and am using the check and reload from the Magic Buttons app.  

The automations and form rules are working as desired when I check and uncheck the checkbox.  But when I use the button I have several issues:
  • not all of the checkboxes are checked using the button
  • any checkboxes that were checked since the previous save are not saved
  • when I try to save I get an error page stating that someone else is editing the record

Please review the code below and let me know what I am missing/doing wrong:

var text urlyes =
    URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&apptoken=##&rid=" & [Record ID#] & "&_fid_3134=1";
var text urlno =
    URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&apptoken=##&rid=" & [Record ID#] & "&_fid_3134=0";
var text notSubmitted = "<a style=\" text-decoration: none; background: #D7D4D3; border-radius: 5px; color: #000; display: inline-block; width: 190px; text-align: center; padding: 8px 20px; font: normal 700 10px/1 \"Calibri\", sans-serif; text-shadow: none; \" href=\"javascript:" & "$.get('" & $urlyes &
    "',function(){" & "location.reload();" & "});" &
    "void(0);\">MS Services Not Submitted</a>";

var text allSubmitted = "<a style=\" text-decoration: none; background: #008000; border-radius: 5px; color: #fff; display: inline-block; width: 190px; text-align: center; padding: 8px 20px; font: normal 700 10px/1 \"Calibri\", sans-serif; text-shadow: none; href=\"javascript:" & "$.get('" & $urlno &
    "',function(){" & "location.reload();" & "});" &
    "void(0);\">MS All Services Submitted</a>";

If(not [Submit All], $notSubmitted, $allSubmitted)​

(app token removed for security purposes)

------------------------------
Paul Peterson
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+22
  • Quickbase Alumni
  • June 1, 2020
URL formula buttons will only work in View mode.  Are you in View mode or Edit / Add Mode on the record when you push the button?

------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------