MackenziePhilli
5 years agoQrew Trainee
URL Button that changes field in the same record
This should be very simple but for whatever reason is NOT working in my app. I'm not sure if there's some settings or restrictions I'm unaware of.
Trying to make a button that when clicked, changes a field from no to yes. My code is:
var text URL =
URLRoot() & "db/" & Dbid () & "?act=API_EditRecord&rid=" & "&apptoken=APPTOKEN" & [Record ID#]
& "&_fid_12=Yes";
"javascript:" &
"$.get('" &
$URL &
"',function(){" &
"location.reload(true);" &
"});" & "void(0);"
I'm not sure if it has something to do with the App token, the "allow app tokens" in from then app properties, my code, etc, but the button does nothing to field.
I tried the same formula in another table, but changed to the correct field ids, and when pressing the button it would change the target field of a different record from the table. I've done the same code in a different app and it works fine. Please help!!
------------------------------
Mackenzie Phillips
------------------------------
Trying to make a button that when clicked, changes a field from no to yes. My code is:
var text URL =
URLRoot() & "db/" & Dbid () & "?act=API_EditRecord&rid=" & "&apptoken=APPTOKEN" & [Record ID#]
& "&_fid_12=Yes";
"javascript:" &
"$.get('" &
$URL &
"',function(){" &
"location.reload(true);" &
"});" & "void(0);"
I'm not sure if it has something to do with the App token, the "allow app tokens" in from then app properties, my code, etc, but the button does nothing to field.
I tried the same formula in another table, but changed to the correct field ids, and when pressing the button it would change the target field of a different record from the table. I've done the same code in a different app and it works fine. Please help!!
------------------------------
Mackenzie Phillips
------------------------------