Forum Discussion

SamKrausz's avatar
SamKrausz
Qrew Cadet
7 years ago

If Checkbox Statements is not Working

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?
  • 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.
  • 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;
  • Yea Yes, you know everything..........

    Thanks for the quick help 

    I learn something today