Forum Discussion

LauraLinssen1's avatar
LauraLinssen1
Qrew Trainee
5 years ago

URL Button - Change Date/Time Field, Save Form, Display Form

I'm trying to create a URL Button field wherein the Date/Time field is changed to Now, then the form is saved and it displays the form. 

I can get the formula to change the Date/Time field and display the form, however, I am running into the issue of saving the form, therefore, if I had anything else typed into another field it doesn't save it. 

Here is my current formula:
URLRoot() & "db/" &Dbid() & "?a=API_EditRecord" & "&rid=" & [Record ID#]
& "&_fid_79=" & Now() &
"&_fid_143=100" & "&rdr=" &
URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#])

I had tried adding in "javascript:DoSaveAdd()" into various spots, which I don't know if that helps or not, but I am not a total Formula Master yet. So any help would be great!

Thanks in advance if anyone can help!
Laura

------------------------------
Laura Linssen
llinssen@jjkeller.com
------------------------------

1 Reply

  • This button looks correct but should only be used in View mode.  The issue is that once you have "dirtied the record" (made unsaved edits) Quick Base sees that and needs to know what do you before navigating away from the page.

    So .. a better plan  for edit mode (not add) is to show a checkbox field.  Then have a form rule that says

    When the checkbox is checked,
    change some date / time field to the current date/time
    some other field to the value 100
    change checkbox to unchecked.

    Then the user can make the rest of their edits and save normally.

    ------------------------------
    Mark Shnier (YQC)
    markshnier2@gmail.com
    ------------------------------