- This topic has 7 replies, 3 voices, and was last updated 5 months, 3 weeks ago by kdv.
-
AuthorPosts
-
2024-07-02 at 8:26 pm #75699takeoutprismCustomer
I am trying to increment and load a 6 digit reference number saved in a google sheet by incrementing with a webhook through Zapier and reading the sheet via csv. This all works great except the Read CSV puzzle is removing leading 0’s from my reference number, turning “000001” into “1” when reading csv data.
How can I keep it from removing the leading zeroes?
2024-07-02 at 11:25 pm #75700xeonCustomersounds like its saving the value as a number rather than a text string.
number: 0001, 0000001 all equals 1
text: 0001, 00000001 and 1 are all different values.
May want to check your variable types.Just a guess.
Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2024-07-03 at 3:06 pm #75708takeoutprismCustomerThe value is text calculated from an integer value in cell A2 with the formula below. When the csv is viewed directly, the value displays properly with the leading zeros. The Read CSV puzzle seems to be converting the value.
=TEXT(A2, "000000")
2024-07-03 at 9:45 pm #75710xeonCustomerOk…well.. good news and bad news.
The “read CSV from” puzzle does truncate leading zeros. Thats a bug or should be a bug.
BUT
You can get around this by using a list puzzle and “load data” directly into the list. This will keep the leading zeros.
See puzzles and console log attached.
Attachments:
You must be logged in to view attached files.Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2024-07-04 at 4:53 am #75712kdvParticipantThats a bug or should be a bug.
It’s not a bug. Numeric values with leading zeros don’t exist. In MS Excel try to type in 0001 and see the result ))) If you want those leading zeros you should read them as text values…
=TEXT(A2, “000000”)
change your formula to
=TEXT(A2;"a000000")
and after reading values from .csv just remove “a” from all values.Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2024-07-04 at 5:15 am #75713xeonCustomerWhich goes back to the original statement….convert the numeric values to strings but its not necessary if you load the data into a list directly.
Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2024-07-04 at 5:26 am #75715kdvParticipantbut its not necessary if you load the data into a list directly.
.csv files usually contain at least 2 columns (parameter;value;description;more). converting such files directly into a list has no sense.
33_truss_4LRB;a00001 counter;a00002 Cube;a00001 monkey.2d4f2c15;a00001 oct_counter_1m;a00002 set_25;a00001
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2024-07-04 at 10:01 am #75722kdvParticipantconverting such files directly into a list has no sense.
but if needed, here’s a replacement for the “read CSV” puzzle: no numbers, string values only.
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
-
AuthorPosts
- You must be logged in to reply to this topic.