-
using “.length” on a csv field
This is driving me bonkers and I have not been able to find any documentation online. I have a csv that I am using to drive a bunch of assets including the Source Text of many layers. The actual input of everything works like a charm, but the included expression does not work for my “day.length”. The “.length” works on column 0 and 1, but anything past those 2 it will not read the length. I have tried reconfiguring the data file but anything past 2 columns and the length can not be read. I am assuming it is how AE is reading the csv with a single digit number. The expression as is works, I just need help getting AE to read the length of dataValue[2,3].
I could reformat the csv but that would require quite a bit of expression changes in my project.
*Less than symbols weren’t displaying properly for the following lines.
M = ((mon.length) < 2) ? [“0″+mon] : [mon];
D = ((day.length) < 2) ? [“0″+day] : [day];mon = footage("Text Source.csv").dataValue([1,3]);
day = footage("Text Source.csv").dataValue([2,3]);
year = footage("Text Source.csv").dataValue([3,3]);
M = ((mon.length) < 2) ? ["0"+mon] : [mon];
D = ((day.length) < 2) ? ["0"+day] : [day];
M + " / " + D + " / " + year