Skip to main content
Question

Add record using QR code with API_AddRecord function

  • November 15, 2021
  • 0 replies
  • 54 views

Hi Comunity, I created a Rich Text field that I succeed in adding a record using QR code  with API_AddRecord call 

the challenge that I have is when I scanned it, save the new record but is not redirect to (var text redirect=URLRoot()&"db/"&Dbid()&"?a=q&qid=6";) and does  not link all fid list it on. see below my Rich text field

var text redirect=URLRoot()&"db/"&Dbid()&"?a=q&qid=6";
var text ADD = URLRoot() &"db/"& [_DBID_SCANS] &"?a=API_AddRecord"&
"&_fid_6="&[Student ID] &
"&_fid_9="&URLEncode("In-Person")&
"&_fid_22="&URLEncode((ToTimeOfDay(Now())));

"<img src=\"http://chart.apis.google.com/chart?chs=100x100&cht=qr&chld=|0&chl="&$ADD&
"&NextURL=" & URLEncode($Redirect)& "\"\"/>"


I have the same button but with url field type and it works perfectly 

I tried to find a code page but I did not succeed, I will appreciate any help.

------------------------------
Data System Analyst (Administrator)
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+24
try this

var text ADD = URLRoot() &"db/"& [_DBID_SCANS] &"?a=API_AddRecord"&

"&_fid_6="&[Student ID] &
"&_fid_9="&URLEncode("In-Person")&
"&_fid_22="&URLEncode((ToTimeOfDay(Now())));

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

var text  URL = $ADD
& "&rdr=" & URLencode($Redirect);


"<img src='http://chart.googleapis.com/chart?cht=qr&chs=240x240&chl="
& URLEncode($URL)& "'>"




------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------