If Checkbox Statements is not Working

  • 0
  • 1
  • Question
  • Updated 6 months ago
  • Answered
This is NOT getting changed from False to True using the following:

var text NewToggle = If([Rechecked]=false,"true","false");
URLRoot() & "db/" & Dbid()  & "?act=API_EditRecord&key=" & [Product #]
& "&_fid_1317= " & $NewToggle

Why?
Photo of Sam Krausz

Sam Krausz

  • 470 Points 250 badge 2x thumb

Posted 6 months ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 53,570 Points 50k badge 2x thumb
I suggest either this
&key=" & URLEncode([Product #])

or else

&rid=" & [Record ID#]

to indicate which record is to be edited.

Maybe there are some spaces or characters in the [product #] that the URL does not like.
Photo of Sam Krausz

Sam Krausz

  • 470 Points 250 badge 2x thumb
Thanks for the reply

Still the same issue

var bool NewToggle = If([Rechecked]=false,true,false);


var text URL = URLRoot() & "db/" & Dbid()  & "?act=API_EditRecord&key=" & URLEncode([Product #])
& "&_fid_1317= " & $NewToggle;

"javascript:" &
"$.get('" & 
$URL & 
"',function(){" &
"location.reload(true);" &
"});" 
& "void(0);"
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 53,570 Points 50k badge 2x thumb
There is a space that does not belong after your = sign

& "&_fid_1317= " & $NewToggle;
Photo of Sam Krausz

Sam Krausz

  • 470 Points 250 badge 2x thumb
Yea Yes, you know everything..........

Thanks for the quick help 

I learn something today 
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 53,570 Points 50k badge 2x thumb
You are building a URL, so there are no spaces allowed in a URL ....
Photo of Sam Krausz

Sam Krausz

  • 470 Points 250 badge 2x thumb
Yes Yes

Thanks