Tutorial for Variable Text?

I’m clueless how to use the variable text feature. I have my csv file but when I open it nothing happens. Can you walk me through the steps?

We sure can. :slight_smile: Have a look at this section of our documentation: https://github.com/LightBurnSoftware/Documentation/blob/master/VariableText.md#variable-text-in-lightburn

After review, if you have specific questions on the use of 'Variable Text, please fire back.

when I open my csv file I see nothing in the variable text window indicating it has been linked

From the ‘Variable Text’ window click the ‘Browse’ button, select the desired file and select ‘Open’. You should then see the file name of said file displayed to the left of the button. Is this not working for you?

image

Here is how to format the text for CSV/Merge text format: https://github.com/LightBurnSoftware/Documentation/blob/master/VariableTextFormats.md#csvmerge-text-format

no it is not working

any ideas? I saved it as UTF-8

It might not like UTF8, but I’m not positive. Can you post a version of your file (remove anything sensitive or private - I’m just looking for a sample to test with)

Me too. I got the csv file to import but it is unclear how to use the special codes to make them read the columns and rows. I have the external link to the github but this is not much help.
Please help. thanks

Columns are just %0, %1, %2, and so on. Rows are indexed with the offset value applied to the text node. Create a piece of text, change the type to CSV, and enter %0 as the text. That will pull column 0 from row 0 and display it. (click the ‘Test’ button to see it quickly).

You can put the %0 (or others) in a normal text line, like this:

The user name is %0

That %0 will get substituted for the data from column zero.

Does that help? I do plan to do a video or a couple of small projects that use this to demonstrate it.

The issue with your file is “Hawkes Bay, NZ” has a comma in it, and the file is comma delimited. I’ll have to add code to handle not counting commas inside quotes - it thinks this line has extra data. If you remove those three lines, or just change the quoted commas to something else for now, it works. (also, Waiheke Island, NZ)

Here’s a sample to demo the usage - you’ll need to fix the lines in your CSV first.
WineTest.lbrn (3.8 KB)

I have several questions related to this.
%0 works with row 1 text in columns 1,2,3,4,5 with offset of 0. However, my subsequent rows do not work with using offsets 1,2,3,… All I get are the commas that i use to separate the columns.

  1. What do i need to do to get the next rows to read from my spreadsheet?
  2. Also, if I have 70+ badges to populate, how do I quickly populate all of these badges and have them retrieve their appropriate fields in the spreadsheet?

I gave this a shot. In Excel 2013, I had to resave the csv file as a ‘mac’ version of csv for it to import into LB properly.

I made this:

I used the array tool to make the 2nd and 3rd columns. It changed the offset for me automatically. His csv file is a bit odd though, since some rows have 6 columns, and some only 5. I’m not sure offhand how you’d handle parsing that properly. Anyhow, that seems to die after it tries the offset=1 column:

Perhaps it’s doing that because pulling %6 actually pulls row2, col1, and the parser loses it’s place?

All rows of a file have to contain the same number of columns or the parser will simply return an error. I need to make this more explicit in the UI.

I can get the columns to read but not the rows. i have been using the offset to both manually and by the array (automatically). Rows will not read. Any suggestions?

Make sure you have a valid ‘End’ value in the variable text box set - that should be the total number of rows you have in your document. If you have extra commas in your CSV file, or the rows aren’t all the same length, it will fail to load properly.

I have set the END value to the number of rows in the CSV file. There are no commas in a CSV file that i can see. All my rows are the same length. Still i cant get even one extra row to read with an offset of 1. i can get my columns to read on the first row by changing my %0 to %1 and so forth. any suggestions?
can you call me and get on team viewer please?

You said there are no commas in your CSV file. That could be your problem right there - CSV means “comma separated values”, so the commas are pretty important.

Email me the CSV file you’re using to developer at lightburnsoftware.com and I’ll have a look at it. Sorry, but I don’t do teamviewer or 1:1 support - it’s too time consuming, and no one else gets to see it. The point of the forum is to let everyone learn.

2 Likes

When i open the CSV file in notepad i see the commas. but when i open it in excel they are still just columns and rows. The file is a mac version csv file. I emailed it to you. thanks

  1. Charge exorbitant amounts for 1 on 1 support
  2. Record the session for YouTube
  3. ???
  4. Profit!
2 Likes