Forum Discussion

HeatherBryant2's avatar
HeatherBryant2
Qrew Assistant Captain
8 years ago

Autopopulate Date Completed with a formula text field

Hello, I'm using this formula text field to change a text multiple choice field to Completed, as well as change % Complete to 100, and Date Completed to the current date. Everything is working great aside from the Date Completed field not being updated. Any ideas why? Thanks!

var text url =

    URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &
    "&rid=" & [Task ID] &
    "&apptoken=u8pt65bmk9v8jdrvxhrsdbycgqb" &
    "&_fid_12=Completed" &
    "&_fid_99=Today()" &
    "&_fid_98=100";

"<a class=\"Vibrant Success\" href=\"javascript:" & "$.get('" & $url &
    "', function(){" & "location.reload();" & "});" &
    "void(0);\">Complete</a>
  • var date todaysDate = Today();
    var text url =

        URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &
        "&rid=" & [Record ID#] &"&_fid_6=Completed" &
        "&_fid_7="&$todaysDate&" " &
        "&_fid_8=100";

    "<a class=\"Vibrant Success\" href=\"javascript:" & "$.get('" & $url &
        "', function(){" & "location.reload();" & "});" &
        "void(0);\">Complete</a>"

    Tested Working Fine!! i think this will solve your issue
  • HeatherBryant2's avatar
    HeatherBryant2
    Qrew Assistant Captain
    John, thank you! This works perfectly. So good to know how to do this. 
  • MCFNeil's avatar
    MCFNeil
    Qrew Captain
    Another option without having to deal with variables is this:

    "&_fid_99="&URLEncode(Today())&" &