Clear a date field when a new drop-down selection is made

Every department has a report to track incoming communication. On the report, I've created buttons to quickly track the communication process. When a new record is appears, the department clicks the 'Received' button which puts a timestamp into a time/date field. I have another button that is called 'Change Dept' so that the communication could be transferred to another department. However, I need the 'Time Received' field to clear so that the record arrives into the new department as if it is a new record. I have the following code to update the department, and need to know what I can add to it to clear the time date field (fid=10) at the same time:

Note that when the user clicks the button, the time stamp field will be cleared, regardless if they bail out while editing the record to change it to another department. That is because the formula URL above will first do the edit to clear the time stamp and then open the record for manual editing.

Change the 999 to your actual Time stamp field ID, and the need for the application token depends on whether you have Application Tokens required for your app as an extra layer of security. That requirement can be disabled ion Application Properties.

Yeah, I figured it would be deleted, but the department changes are logged and time-stamped in another field, so I'm good with that. I just need the blank date in order to trigger the row colorization which lets the department know that it's an incoming request. It worked beautifully. Thank you!

Using script and the IOL technique you can easily implement a generic technique that will allow you to add custom parameters to the common record manipulation URLs. In particular you can add the desired functionality to initialize field value of the ?a=er URL. Here is a demo and screenshot showing editing the first record with and without the custom _fid_* URL parameters::

(1) The code in the pastie is generic and can be used to implement this functionality for any table or set of fields.

(2) The IOL field is included only for ?a=er pages

(3) This technique of adding custom properties and parsing them out in script to perform some useful action can be extended to many other use cases. For example you could easily arrange to pass the name of a code page with a parameter &script=myscript.js and within with the IOL module.js page just insert a generic $.getScript() to load the script passed in the URL.

Once I come up with a snappy name for this technique I will add it to my forthcoming QuickBase Swimlane Catalog (it's big and chocked full of goodies):