Chalkster Posted December 12, 2005 Posted December 12, 2005 Is there any way of inserting a tab character into a field by calculation (similar to the way a ¶ can be added) for formatting? The problem is I export large amounts of data in tab separated text files. Much of this is from related tables in large chunks. eg a typical export might have two fields from the source table, 25 fields from related table A , another couple from the original table and thirty from table A etc etc What I was wanting to try was combining each chunk of fields from the related table into single calculated fields and thereby reduce the numberof fields in the export dramatically. In fact in the main export it would actually reduce the number of fields to export from 286 to 17 if I could export in chunks. Is there any way to make a calculated field of possibly 20 or 30 ields using a tab character as a separator? Or adding a tab character to a field by calculation?
Lee Smith Posted December 12, 2005 Posted December 12, 2005 Just capture a tab in a text application and insert in quotes. when using it in a calculation like this " " ( <- there is a tab in there.) BTW, you could also create a global field and past it too. Then you would only need to use the global field in the calculation instead. HTH Lee
LaRetta Posted December 12, 2005 Posted December 12, 2005 (edited) With Windows at least, you don't have to capture the tab from text editor. Just type your calc as: textField & "CTRL-tab " & textField etc. Don't type CTRL-tab, do it. ^) Edited December 12, 2005 by Guest
Chalkster Posted December 12, 2005 Author Posted December 12, 2005 Of course... a tab in a field! I guess I couldnt see the wood for the trees>>> Thanks And LaRetta... thanks too... but I'm on a Mac:)
LaRetta Posted December 12, 2005 Posted December 12, 2005 I find it hard to imagine that it wouldn't work on a Mac! Macs do most things better! How about Option-Tab? Option is same as CTRL, right?
Lee Smith Posted December 12, 2005 Posted December 12, 2005 It's suppose to, but I have never been able to make it work. Lee
Chalkster Posted December 12, 2005 Author Posted December 12, 2005 (edited) Ok.... results are in I tried it on mac and on pc (running in virtual PC on a mac) The pc works fine... the tab is inserted... but I have no joy on the mac (which where I do 99% of my work!) I tried using a global field with a tab inserted from the Textedit program I tried manually inserting the tab in the calculation Neither worked in either the calculated field or in the export on the mac I also took the file to the pc... added the tab and took it back to the mac. Everything was fine on the pc but it lost the tab when it moved back to the mac :-(( Any other ideas on the mac? Edited December 12, 2005 by Guest
comment Posted December 12, 2005 Posted December 12, 2005 I have never been able to insert a tab into a calculation. What I do is type Option-Tab into a text field in Browse mode, copy it, go into Define Database and paste it in between quotes. You can even make it like this: Let ( tab = "<>" ; field1 & tab & field2 & tab & field3 ) Mind you, an Option-Tab is not the same character as the tab that separates fields in a tab-deliminated export.
Fenton Posted December 12, 2005 Posted December 12, 2005 It looks like FileMaker is trying to protect us from doing something like inadvertently break a field into two just because it had a tab character in the text, when choosing Tab-separated text. It goes out fine as Comma-separated; but I guess you don't want that. Another alternative is XML, with an XSL stylesheet. Using that I can export both a tab within a field or a return within a field, with ".txt" as the file extension. It isn't so particular about what you're exporting, because there's no preconceived notions as to what it should be. I don't know that that will solve your problem, as I think there's more of a speed hit involved with XML export. You might be better off just biting the bullet and exporting your many fields as tabbed text. Also, the fact that your concatenated fields would want to be unstored, so as not to bloat the database; so they'd need to evaluate. This is a generic stylesheet for an XMLRESULT export of tabbed text: <?xml version="1.0" encoding="utf-8"?> xmlns:fm="http://www.filemaker.com/fmpxmlresult" exclude-result-prefixes="fm" >
Recommended Posts
This topic is 6986 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 accountSign in
Already have an account? Sign in here.
Sign In Now