We’ve got a list of locations together with dates for each one. Via an asset listing, I can access the name of the location for each CSV data source record set but when I try to access the date, nothing is printed.
For example:
<script runat="server">
var thisLocation = '%ds__location%';
var thisDate = '%ds__date%';
print( thisLocation+" is being cleaned on "+thisDate);
</script>
The location is printed in the sentence but not the date - it’s blank!
I’ve tried removing all the SSJS and just using %ds__date% too but still nothing comes out. I’ve checked the asset listing and it is listing the write assets - unpublished CSV data source record sets with a specified root node but still nothing.
The only difference I can see if that the location is a simple string but the date is formatted like … well, a date - 26/05/2021 for example.
Version 5.5.3.3 @Bart. I can’t upload the doc as the Forum won’t allow it in CSV format. Here’s an excerpt from the equivalent CSV (Comma Delimited) formatted doc anyway:
The CSV file is accepted into Squiz Matrix and the records broken down. The data (24/06/2021, for example) isn’t change during that process and it shows in the exact same format in the data record set (see above) but unfortunately, nothing shows in the asset listing, with or without SSJS @Bart
Then I’m out of ideas
Might need to send a ticket in to Squiz support (if you are a customer) so that they can have a closer look and try and figure out what’s wrong.
Hi @Bart. Did Squiz Support ever come back on this one? I’m giving it a second run and still having the same issues - Squiz CSV Data Source doesn’t like dates. Could it be that, when a %ds__ starts with a number, it screws up Squiz in the backend?
Hi Lewis,
It might not be clear, but I think the suggestion from Bart was for you to lodge a Service Request with Squiz for this issue.
Then our team can investigate it further for you.
Hi @NickyP. No, there isn’t anything like that - just vanilla characters.
Incidentally, I’ve created a Data Record which uses a Metadata Schema to hold a user’s email address recently and originally called the metadata field email but had to change it to email_address as Squiz wouldn’t print anything otherwise.
When I revisit this, I’ll try calling the date field something like cleaning_date for example. See if that works. Not sure if I did before though … ?