Forum Discussion
jasonjohnson1
Qrew Cadet
Try wrapping everything inside the var text inside a URLEncode like below. This is a method that I use when doing 2 different types of API commands in a single button click so it might work here as well. I also changed the third line data from Now() to "today" because Now() gives the time that the browser last refreshed not the actual now.
var text url=
URLEncode(URLRoot() & "db/" & [_DBID_TIME_CARDS] & "?a=API_EditRecord&apptoken=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
& URLEncode ([Max Check-In Time Card Record ID # for Current User])
& "&_fid_33=" & URLEncode("today") // check out
& "&_fid_35=" & URLEncode([WORK_ORDER - wo_number])
& "&rdr=" & URLEncode(URLRoot() & "db/" & [_DBID_TASKS_CHECK_OUTS] & "?a=nwr&dfid=2"
& "&_fid_9=" & URLEncode([Record ID#])
))
;
If([Max Check-In Time Card Record ID # for Current User]>=1,
"javascript:" & "$.get('" & $url & "', function(){" & "location.reload(true);" &
"});" & "void(0);"
)
------------------------------
jason johnson
------------------------------
var text url=
URLEncode(URLRoot() & "db/" & [_DBID_TIME_CARDS] & "?a=API_EditRecord&apptoken=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
& URLEncode ([Max Check-In Time Card Record ID # for Current User])
& "&_fid_33=" & URLEncode("today") // check out
& "&_fid_35=" & URLEncode([WORK_ORDER - wo_number])
& "&rdr=" & URLEncode(URLRoot() & "db/" & [_DBID_TASKS_CHECK_OUTS] & "?a=nwr&dfid=2"
& "&_fid_9=" & URLEncode([Record ID#])
))
;
If([Max Check-In Time Card Record ID # for Current User]>=1,
"javascript:" & "$.get('" & $url & "', function(){" & "location.reload(true);" &
"});" & "void(0);"
)
------------------------------
jason johnson
------------------------------
MarkShnier__You
5 years agoQrew Legend
I think, that Thomas already has it working from the post above, but I appreciate the "today" tip.
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------