Skip to main content
Question

If Checkbox Statements is not Working

  • June 20, 2018
  • 0 replies
  • 21 views

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?
This topic has been closed for replies.

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.

  • Author
  • Registered
  • June 20, 2018
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);

There is a space that does not belong after your = sign

& "&_fid_1317= " & $NewToggle;

  • Author
  • Registered
  • June 20, 2018
Yea Yes, you know everything..........

Thanks for the quick help 

I learn something today 

You are building a URL, so there are no spaces allowed in a URL ....

  • Author
  • Registered
  • June 20, 2018
Yes Yes

Thanks