Forum Discussion

JeffPeterson1's avatar
JeffPeterson1
Qrew Captain
5 years ago

URL button not working

I have a URL button that when clicked updates a few fields but mine seems to be broken and I'm sure where the problem is.   Here is the code:

var text URL= URLRoot() & "db/" & Dbid()
& "?act=API_EditRecord&rid=" & [Item #]
& "&_fid_758=" & "Ready" // scope status
& "&_fid_25=" & "New" // status
& "&_fid_53=" & Today() // start date
& "&_fid_12=" & WeekdayAdd(ToDate([Start Date]),3) // due date
& "&_fid_254=" & URLEncode("Changed Scope Status to: Ready"); // event logs

var text URLTWO = URLRoot() & "db/" & Dbid() & "?a=q&qid=309";

If([Status]="Completed" or [Scope Status]="Ready" or [Scope Status]="Ready Now" ,"",

"javascript:" &
"$.get('" &
$url &
"',function(){" &
"$.jGrowl('Marked as Ready', {life: 3000, theme: 'jGrowl-green'});" &
"});" &
"void(0);"
)

I see the growl when the button is clicked but nothing else works.  Any ideas?

------------------------------
Jeff Peterson
------------------------------
  • In order to debug this, you need to remove the javascript to expose the error.

    var text URL= URLRoot() & "db/" & Dbid()
    & "?act=API_EditRecord&rid=" & [Item #]
    & "&_fid_758=" & "Ready" // scope status
    & "&_fid_25=" & "New" // status
    & "&_fid_53=" & Today() // start date
    & "&_fid_12=" & WeekdayAdd(ToDate([Start Date]),3) // due date
    & "&_fid_254=" & URLEncode("Changed Scope Status to: Ready"); // event logs

    $URL


    My guess is that the Item # is not the Record ID.​  Is the Key field to the table the Item #?

    maybe you need
    & "?act=API_EditRecord&rid=" & [Record ID#]

    or else you are missing the apptoken



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