Jump to content

Change A Field When A Date Is Added

Recommended Posts

hello I am new to Caspio and really need a little help.


I need to have my field Response updated when a date is added or changed to the field ServiceDate. 


The Response should be "New Date", "Updated Date" or null (if the value was not changed).


ANy assistance would be greatly appreciated!!

Link to comment
Share on other sites

Hello James,


I think, you can add Header&Footer element and add the following code:

var beforeDate = document.getElementById("EditRecordmyDate").value;

function checkStart()
   var afterDate = document.getElementById("EditRecordmyDate").value;
   if (afterDate==beforeDate) { }
          var status_update = document.getElementById("EditRecordupdated").value;
          if (status_update == "") {status_update = "New Date"}
             else {if (status_update == "New Date") {status_update = "Updated Date"} }
         document.getElementById("EditRecordupdated").value = status_update;

Please, enter names of your fields instead of "myDate" and "updated".

I tried with field with name "updated" that is Hidden and myDate that is text field.


I hope it helps.

Link to comment
Share on other sites

  • 4 years later...
  • 4 months later...

Hi @james1234,

Just to add from the previous comments above, you can also use Triggered Action. Triggered Actions allow data manipulation, calculations and sending notifications by constructing application logic with a visual interface. They will be executed on specified events to perform actions on data in your tables. Changes in one table can affect data in other tables.

Kindly check this link for more information: https://howto.caspio.com/tables-and-views/triggered-actions/



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...