PaulPeterson1
5 years agoQrew Assistant Captain
URL Formula not working as needed
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:
Please review the code below and let me know what I am missing/doing wrong:
(app token removed for security purposes)
------------------------------
Paul Peterson
------------------------------
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
------------------------------