Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6155 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (edited)

I don't know if this is possible, but based on the things I have seen people in here come up with, I am pretty hopeful. :

I need to export these songs in to groups of 1000, (1-999), (1000-1099) etc., into a txt file. They must end up in this exact format for the text file.

000001|UNBREAK MY HEART|BRAXTON, TONI

000002|YOUNG AMERICANS (P)|BOWIE, DAVID

000003|TOO GONE TOO LONG|

000004|ALWAYS LOOK ON THE BRIGHT SIDE|

000005|ALL I ASK OF YOU|PHAMTOM OF THE OPEA

000006|ALL MY LIFE|K CI & JOJO

So its, JB#|Title|Artist

All on one line and with no spaces.

The problem is, I have all my songs, artists, etc. in filemaker, but the karaoke machine is missing some of the information.

The karaoke machine makes txt files that it reads in groups of 1000 songs as follows:

JB000000.txt is for songs 1-999

JB001000.txt is for songs 1000-1099

and so on

So I would like to be able to create these txt files from filemaker, then overwrite the ones on the karaoke machine. It beats typing all that info back in again.

I have attached a copy of the karaoke DB from filemaker for reference.

I am wondering if the correct way to do this would be to create a new field in FM, that gives each record a result of this:

000001|UNBREAK MY HEART|BRAXTON, TONI

then export that field.

It's over my head. LOL

Thanks, Dave

karaoke.zip

Edited by Guest
Posted

I just answered my own question. I created a new calc field, then used the getastext function to get the result I wanted. then I exported that, and Voila!

In case anyone read this, and was curious, this is what I did:

GetAsText ( JB# & "|" & Title & "|" & Artist)

Then exported that field

Thanks, Dave

Posted

Well I guess I still need help.

I created a script to export the files I need. Then I take them to the Windows PC, which happens to be the karaoke machine.

The problem is, I export the files into a tab separated file, and use Windows (ANSI) for the format. I then rename the file so it ends in .txt

This may be the problem, but the windows machine needs the file to end in .txt

So it looks great, until I put the file on the windows machine.

On my mac it looks like:

000001|song|artist

000002|song|artist

000003|song|artist

But when I get the file over to my Windows machine it looks like:

000001|song|artist000002|song|artist000003|song|artist

It does not recognize that they are on different lines.

I have tried several different things, but nothing works yet.

Thanks, Dave

Posted

I think the problem is that even though you say to use Windows ANSI for the text encoding, it still uses the OS line endings, Mac in this case.

You could Export XML, with an XSL stylesheet. I believe the attached xsl file will give you pipe-delimited fields, with Windows line endings.

It uses utf-8 encoding. But this is usually accepted everywhere. Otherwise you could change that to another, like:

iso-8859-1

FM_Data_Pipe_PC.xsl.zip

Posted

Thanks for the reply.

It needs to end up as a txt file, when I put it in the correct folder on the windows machine. So after I export it as you suggested, then do I export the new file into a txt file?

Thanks Dave

Posted

Export XML can produce a text file, or an xml file, or an html file. In reality, all 3 are "text" files. So when you Export XML, you're asked whether/which XSL file to use, as a kind of "filter." Also what grammar to use; I'm using FMXMLRESULT, which is the default I believe. Then you Export, like any other export, choosing which fields, etc.. The result IS a text file. There is no 2nd step required.

Posted (edited)

O.K. I read up on stylesheets, and I am clueless on how they work. But I exported as you said, and it did work. The result did put an extra return between each song, but the program didn't seem to care when reading it.

It looked like this:

000001|title|song

000002|title|song

000003|title|song

instead of

000001|title|song

000002|title|song

000003|title|song

I doesn't really matter as long as it works, and it does. Quite amazing the things you come up with.

Thank you very much, Dave

songlist.txt

Edited by Guest

This topic is 6155 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.