Jump to content

Steve G

Members
  • Content Count

    62
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Steve G

  • Rank
    member
  1. Steve G

    Creating Order from Chaos

    I've got about 97,000 records with each record being a unique file name. The file names are everything from "Picture 1.png" to things like "724358428520_108594.TIF". What I need is a script that will look for a block of numbers in each file name, then copy that block of numbers to another field in that record. The blocks of numbers can be anywhere from six to 20 digits. They are not in the same place in every file name. They are always separated from the other components of the file name by a space, dash, or underscore. Some file names have numbers attached to letters in addition to the block of numbers I need (e.g., "coltrane-72dpi-727738.jpg"). Some file names have multiple blocks, e.g., "Roof_028_20100126_150547.jpg" or "724353767020_104967_RGB_3x3_72.JPG" in which case I would need an "all-encompassing" set of numbers ("028_20100126_150547" and "724353767020_104967" in this example, respectively). Is there ANY hope of salvaging these numbers through some clever scripting?
  2. Steve G

    Export Field Contents

    Yes, but the ASCII export substitutes those vertical tabs for the CRs that are in the field, so that's unusable without some kind of post-processing. In other words: Exporting the field contents gives me the UTF-16 file, and exporting the record gives me vertical tabs. Either way, the resulting file does not render properly despite having otherwise-correct HTML in it. I redownloaded your script and I'm getting the same errors and the same missing object, btw. It really does blow my mind that there's no way to do a straight-up 100% pure plain text export from FileMaker. BTW, I redownloaded your script and I'm getting the same errors that I got the first time I downloaded it.
  3. Steve G

    Export Field Contents

    After some Googling it appears that the cause of my woes appears to be something called a "vertical tab" character which FileMaker uses to replace a CR in any given field. If I export the record (as opposed to the field), open it in TextWrangler, S&R the vertical tab for a CR, then save, it comes out perfect. There doesn't appear to be a way to manage this inside of FileMaker so now I just need a way to do it outside. Bruce, do you have a script? I was able to do it manually in TextWrangler by copying the space between what I knew would be two lines and pasting it into the search field, then using "r" in the replace field which is what TextWrangler interprets as a CR. TextWrangler seems to interpret the vertical tab as "x0B".
  4. Steve G

    Export Field Contents

    The limit shouldn't be a problem; the most I could ever envision passing is about 40,000 characters, maybe 50,000 at most. The average is around 15,000-20,000. I'll admit I haven't done much work with shell commands. I opened your file and ran it, and got two back-to-back errors: "Object not found" followed by "Unknown error: -1728". Looking at your script, the $sourceField Set Variable command shows a function missing. Forgive my ignorance, but is there something I need to insert there?
  5. Steve G

    Export Field Contents

    There's no tabs in the field so that's not a problem. There ARE line breaks (RETURNs) but if I'm going to HTML that shouldn't be a problem. I tried your advice; I changed the script step from "Export Field Contents" to "Export Records" using the tab-delimited format. This time when I open the file in my browser it was oddly distorted. Most of my text was there but every apostrophe and quote mark was turned into a symbol that looks like a white question mark inside a black diamond. Plus, my CSS information was disabled/ignored When I tried to open the file in TextWrangler I got an alert: "The UTF-8 file...is damaged or incorrectly formed; please proceed with caution." I did a search and replace to swap the question mark-diamond for an apostrophe and resaved. The apostrophes appeared as you'd expect but my CSS info is still MIA.
  6. I built a script that takes data from a number of different fields, converts it into simple HTML, pastes the aggregate information into a single text field, and then exports that text field to a file on the desktop. It all works quite smoothly. However, there's a problem and I don't know where it stems from. If I open the exported file (which has an .html extension, btw) in my web browser it renders correctly. If I upload the exported file to the web site and then open it, I get garbled Chinese characters along with a few random strings of Roman text. IOW: If I open the file locally it renders correctly, but if I open it remotely it doesn't. In experimenting I discovered that if I open the file in a text editor (TextWranger in this case), select all, make a new document, paste, and save the new document, the resulting file renders properly both locally and remotely. Further investigation shows that the file that was exported from FileMaker is almost twice as large as the file that was saved from TextWranger (29,972 bytes vs 15,009 bytes). In either case TextWrangler says that the two files contain the same amount (14,985) of characters. I think what's happening is FileMaker is exporting the field as a Rich Text file but I see no way to verify this (or change it if I'm right). This would account for the doubled file size; one is RTF, the other is ASCII. How can I get FileMaker to export my text field as plain old ASCII?
  7. I have a web enabled (IWP) database that has five layouts, each representing one of five pages on the "site". A web user points his browser to the FM server and clicks on the link to get into the database. He's a guest user and the database is set up to allow guest user access without needing a login. He sees Layout #1. He clicks a link that moves him to Layout #3. He closes his browser window, opens a new browser window, goes back to the FM server and clicks on the link to get into the database again. He gets Layout #3. This is definitely a cookie thing. If, in between visits to the FM server, the web user deletes the cookie he gets from the FM server, he sees Layout #1 again. Is there any way to force Layout #1 to appear as the "home" page, no matter what?
  8. Steve G

    Automatic text resizing in a field?

    Not possible in this situation. The font is to be used on a decorative certificate that's printed directly from FileMaker.
  9. Steve G

    A Sorting Conundrum

    I have a value list built on the contents of a calculation field ("Quarter") which contains either "First Quarter", "Second Quarter", "Third Quarter", or "Fourth Quarter", then a space, then a year (2008, 2009, etc). So a typical value list might look like this: First Quarter 2007 First Quarter 2008 First Quarter 2009 Fourth Quarter 2007 Fourth Quarter 2008 Second Quarter 2007 Second Quarter 2008 Second Quarter 2009 Third Quarter 2006 Third Quarter 2007 Third Quarter 2008 Third Quarter 2009 What I want is for all the years to be together, with the quarters in logical order, like this: Third Quarter 2006 First Quarter 2007 Second Quarter 2007 Third Quarter 2007 Fourth Quarter 2007 First Quarter 2008 Second Quarter 2008 Third Quarter 2008 Fourth Quarter 2008 First Quarter 2009 Second Quarter 2009 Third Quarter 2009 So what I did was create a second calculation field ("Quarter Sort") which gives me a sorting number I can work with. "Third Quarter 2006" generates "2006 3", "Second Quarter 2008" generates "2008 2", etc. Now I'm stuck. What I need is for FileMaker to display AND use the data in "Quarter", but sort it according to the data in "Quarter Sort". This doesn't seem possible but perhaps I'm missing something. Is there a way to do this that I'm not seeing?
  10. Steve G

    Automatic text resizing in a field?

    I try that but run into the same issue; names with a lot of thin characters (i, l, f, etc) measure differently than those with a lot of wide characters (w, m, n, etc).
  11. One of my tables has a certificate layout that, when printed, generates what is essentially a Certificate of Merit with the person's name on it. That layout has, among other things, a field for the person's name. The field's default text size is 60pt and it works fine. The problem is that sometimes there will be more than one name in that field. It's even possible that there could be many names in there (like, 15 or more) and 60 point type won't cut it. I've managed to set up conditional formatting that will adjust font size based on the number of words. Generally this works well except when I have really long names to contend with. So when it's "John Smith, Mary Jones" it works fine, but when I have "Savatore Mattuciliogne, Belvedere Fredericks Wellington" it doesn't work so hot. Is there any way to basically dynamically scale the text in a given field based on the amount of content that's in that field? (The way Acrobat does this with PDF forms is exactly what I need.)
  12. Steve G

    Zero margin printing?

    You just solved the problem. Thanks!
  13. Steve G

    Zero margin printing?

    I have a printer that allows me to do zero-margin (edge to edge) printing. I can create an image in Photoshop that covers an entire 8.5x11 page and, when I print it, I get 100% of that layout. In FileMaker 9, not so much. When I set up a layout in FileMaker it isn't giving me a full 8.5x11 page. There's about 1/4" to 1/2" on all four sides. The Page Setup is correct; FileMaker simply won't let me do it. When I print out my page from FileMaker I get a white border around the edge of my page. This is unacceptable for what I need to do. If I go into Layout mode and go to View -> Page Margins it shows me what FileMaker THINKS are the page margins, but I'm unable to drag my Photoshop image past the margin area (into what FileMaker thinks is an unprintable area). Is there any way around this?
  14. Steve G

    Print Settings Stuck

    FWIW, I had lengthy discussions with Brother about printing from FileMaker. According to Brother they don't consider the P-Touch to be a "printer" but rather a "label maker", so they only support printing through the P-Touch application. This is a crock of you-know-what, of course, but the short of it is that Brother is not at all interested in allowing other applications to print to their P-Touch printers, and they design their software and drivers to reflect this.
  15. I've only done 'passive' things with IWP, just reading information from a database. Never had people entering data from a web browser until now. At exactly what point does user input become part of the database? IOW, if you're working in FMP directly (not via IWP) and you enter data, it's pretty much instantly part of the database. If someone is on a web-enabled version of that page, does it work similarly? Is there a timeout or some other 'automatic' entering of the data? Basically I need to set up a system where a user can enter specific data (name, department, comments, etc) but I don't want that data to become part of the database until the user clicks a SUBMIT button. If the user enters data and then closes the browser window (without clicking SUBMIT), or if the user enters data and then walks away (leaving the browser window open for potentially hours at a time), I don't want that data to be entered into the database.
×

Important Information

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