5 posts by 3 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: June 14, 2019   (RSS)

By nmsinc - June 7, 2019 - edited: June 7, 2019

Is there a way to force the saving of the 'createdDate' field when uploading in CVS 1.13?

Thanks - nmsinc

nmsinc

By nmsinc - June 12, 2019

Hi Damon,

Just needed to know why the createdDate does not populate with the current date of import for each file that is imported from CVS!

Thanks - NMS

nmsinc

By Dave - June 14, 2019

Hi nmsinc, 

There's no particular reason, it's just never come up before and it's one of those edge behaviours where it's not entirely clear that one behaviour would be obvious and expected in all scenarios.  createdDate is set through the application, not through MySQL, so it doesn't happen automatically.  Some of the edge cases would be what to do when a user is importing createdDate but it's blank, etc.  In general, importCSV doesn't automatically set any values except what is being imported.

If you need that functionality you could try creating a TIMESTAMP field and setting it's default value in the mysql schema.  See: https://dba.stackexchange.com/questions/132951/cant-default-date-to-current-timestamp-in-mysql-5-5  

Note that I haven't tested that.  Another option would be to modify the plugin or write some custom code.  

Hope that helps, let me know any questions!

Dave Edis - Senior Developer
interactivetools.com

By nmsinc - June 14, 2019

Thanks Dave - appreciate the feedback. I will try some custom code in the plugin!

nmsinc

nmsinc