Discussions

 View Only
  • 1.  If Checkbox Statements is not Working

    Posted 06-20-2018 16:52
    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?


  • 2.  RE: If Checkbox Statements is not Working

    Posted 06-20-2018 17:19
    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.


  • 3.  RE: If Checkbox Statements is not Working

    Posted 06-20-2018 17:24
    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);


  • 4.  RE: If Checkbox Statements is not Working

    Posted 06-20-2018 17:28
    There is a space that does not belong after your = sign

    & "&_fid_1317= " & $NewToggle;


  • 5.  RE: If Checkbox Statements is not Working

    Posted 06-20-2018 17:30
    Yea Yes, you know everything..........

    Thanks for the quick help 

    I learn something today 


  • 6.  RE: If Checkbox Statements is not Working

    Posted 06-20-2018 17:31
    You are building a URL, so there are no spaces allowed in a URL ....


  • 7.  RE: If Checkbox Statements is not Working

    Posted 06-20-2018 17:33
    Yes Yes

    Thanks