Alpha Video Training
Results 1 to 3 of 3

Thread: Image File Reference Field

  1. #1
    Member
    Real Name
    Linda F
    Join Date
    Apr 2006
    Posts
    96

    Default Image File Reference Field

    I'm trying to create a field that stores the location of a file that contains a scanned image. I've called the field "facesheet" and made it an image file reference field.

    What I want to do is assign the file name when the record is created using a default value in the field rules. For example, John Smith's (whose birthday is 05/01/1997) scanned image file would be named:

    SMI050197.jpg

    I have no problem creating a calculated field to create that file name in the field rules with this formula:

    substr(patientl,1,3)+substr(dtoc(bday),1,2)+substr(dtoc(bday),4,2)+substr(dtoc(bday),7,2)+".jpg"

    But when I try to add the directory to the name using:

    "C:\DATA\"+substr(patientl,1,3)......and all the rest


    I get an error telling me that it is an invalid or incomplete expression. It's the \" part of that string that's doing it.

    First, should my default expression for an image file reference field evaluate to a character string like I'm doing? Or should I make "facesheet" a character field? I'm going to create a script that opens that file from a form so the user can print it or look at it. I don't need the image itself to be a part of the record at all. I've changed the type to character, and I get the same error.

    When I use action scripting to create the button to open the non-A5 file, there is an option where I can specify an expression that evaluates to the name of the file I want to open. I was going to put the fieldname "facesheet" there.

    In a perfect world, I would have something in A5 that would allow the user to scan the image by pressing a button on the form, name it, drop that name into the "facesheet" field and then press another button to look at it later. But, I don't think that first part is possible, at least not from what I've seen on the forum here. So, I'm assigning the name when the record is entered and scanning the image and naming it the same thing outside A5.

    Thanks for any help you can give me with this.

    Linda

  2. #2
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default

    "C:\DATA\\"+substr(patientl,1,3)......and all the rest

    In the help file

    specifically

    Adding Backslash Characters

    If you need to include a backslash in an expression, use a second backslash to escape it.

    myvar = "\\"

    ? myvar

    = "\"

  3. #3
    Member
    Real Name
    Linda F
    Join Date
    Apr 2006
    Posts
    96

    Default Re: Image File Reference Field

    That was so easy!

    Thanks.

    Linda

Similar Threads

  1. Use character field to reference image file
    By Howard G. Cornett in forum Alpha Five Version 6
    Replies: 3
    Last Post: 08-01-2005, 07:59 PM
  2. Bitmap, JPEG Image, or Image File Reference?
    By Elke in forum Alpha Five Version 6
    Replies: 4
    Last Post: 02-09-2005, 03:38 AM
  3. Checking contents of 'image file reference' field
    By Bill Walker in forum Alpha Five Version 6
    Replies: 5
    Last Post: 02-02-2005, 04:25 PM
  4. Image file reference field problem on reports.
    By PhilD in forum Alpha Five Version 5
    Replies: 6
    Last Post: 12-23-2003, 06:52 AM
  5. Image File Reference
    By Gregory R. Zilliox in forum Alpha Five Version 5
    Replies: 1
    Last Post: 12-14-2003, 03:54 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •