Forum Discussion

MannyCruz's avatar
MannyCruz
Qrew Assistant Captain
8 years ago

Auto-Fill an end date?

Hey, guys, I'm pretty new to QuickBase, but I currently have a button that sets the status of a task to "Complete" and redirects to the table view (where you originally clicked the button)

I tried to use a form rule that would Auto-Fill the end date with today's date once the status changes to complete, but it isn't cooperating with the button. So the status will change but it won't populates the date. 

Can I get my current "complete" button to populate the date too?

Here's the button code, thanks!

var text url=
URLRoot()& "db/" &Dbid()& "?a=API_EditRecord" & 
"&rid=" & [Record ID#]&
"&apptoken=cn3eu67ch3m9b76jdmn5b7vzn6d"&
"&_fid_10=Complete";

"javascript:" &
"$.get('" & 
$url & 
"',function(){" &
"location.reload();"&
"});
  • MCFNeil's avatar
    MCFNeil
    Qrew Captain
    Form rules only work while manually editing the form.  

    You'll need to add the date field to your code above.  

    What is the field ID of the date field you are wishing to populate?
  • MannyCruz's avatar
    MannyCruz
    Qrew Assistant Captain
    Thank you for the reply!

    See, I didn't know that about QuickBase, 

    The field ID of the date field I want to populate is "9
  • MCFNeil's avatar
    MCFNeil
    Qrew Captain
    Insert this into your equation;

    "&_fid_9="&URLEncode(Today())

    So it will look like this...

    var text url=
    URLRoot()& "db/" &Dbid()& "?a=API_EditRecord" & 
    "&rid=" & [Record ID#]&
    "&apptoken=cn3eu67ch3m9b76jdmn5b7vzn6d"&
    "&_fid_10=Complete"&
    "&_fid_9="&URLEncode(Today())
    ;

    "javascript:" &
    "$.get('" & 
    $url & 
    "',function(){" &
    "location.reload();"&
    "});
    • _anomDiebolt_'s avatar
      _anomDiebolt_
      Qrew Elite
      Thanks for the sloppy formula - I modified my grammar to allow whitespace before the closing semicolon on formula variable declarations. Keep posting formulas (a) with errors, (b) without errors or (c) with sloppy formatting and I will keep patching the grammar.