======== TEMPLATE BUG FORM ========
Wappler Version :3.9.7
Operating System :10
Server Model: node
Database Type:MariaDB
Hosting Type:Digital Ocean/ Docker
Expected behaviour
Data in date/time fords should be preserved
Actual behaviour
Fields are set to Null
I have a simple users table with date of registration and date of confirmation stored as Timestamp
If i query the table the timestamps are clearly visible in the dev console output:

I then apply a data transformation -> add columns and add one column, role default “U”

Viewing the output shows the role field added but the timestamp data is set to Null

for info, think the same issue is happening with boolean fields
Here an update, let me know if it solved the date problem.
Unzip the file in lib/core
.
util.zip (1.4 KB)
Yes, that seems to have fixed the issue thanks
@patrick, what about paged queries? Adding a column seems to remove all the “paging” properties.
Here is the straight paged query named ‘query’:
After I add a Transformation to add a column, I get this:
“set” in the second image is the same as “data” in the first one and I can correct that by changing the Name property in the add column properties, but I loose all the other properties.
Will your fix correct this too, or am I doing something wrong?
Thanks!
The Data Transformations can only be applied on arrays with objects in them, so you can apply it to query.data
, but not to query
directly. Also data is never being updated by reference, so the original data will not be changed and a new collection is returned.
Yes, I had to change from ‘query’ directly to ‘query.data’ when going from a Multiple Records query to a Paged Records query and as I said, ‘data’ and ‘set’ in my previous post are the same data (minus the new column), but I lost the other properties; limit, offset, page and total.
So, I’m still not sure how to add a column to a Paged Records query without loosing the paging properties.