Alpha DevCon 2018
Results 1 to 12 of 12

Thread: Capturing PDF File Location Into a Character Field

  1. #1
    Member
    Real Name
    Bob M
    Join Date
    Dec 2001
    Posts
    513

    Default Capturing PDF File Location Into a Character Field

    Using A5-V10.5 on Windows 8 machine.

    I am able to find a pdf file location using a dialog box and the capture a non-Alpha File action Script feature.

    However, I want to save/store that pdf location and name in a character field, so in the future, I can click the field and open the file at a later date.

    There is a form in my database that includes a one-to-many link to a variety of pdf documents associated with a person's unique id. Hence it would be stored in a one to many browse field on the form. I use a button to call the XDialog Box.

    I know very little Xbasic and am comfortable with Action Scripting and do a great job of cut and paste when given the correct code!

    Thanks, in advance, for the help.

  2. #2
    "Certified" Alphaholic
    Real Name
    Gregg Schmidt
    Join Date
    Mar 2001
    Location
    Milwaukee
    Posts
    1,012

    Default Re: Capturing PDF File Location Into a Character Field

    The answer depends on the backend you're using (dbf or some version of sql).
    The most important thing, no matter what your backend is, would be that the character field
    must be large enough to contain the entire filename.

  3. #3
    Member
    Real Name
    Bob M
    Join Date
    Dec 2001
    Posts
    513

    Default Re: Capturing PDF File Location Into a Character Field

    the character field could easily be 75 or more, up to the max of 255. I doubt any filename + path would be more than 100 characters.

  4. #4
    "Certified" Alphaholic
    Real Name
    Gregg Schmidt
    Join Date
    Mar 2001
    Location
    Milwaukee
    Posts
    1,012

    Default Re: Capturing PDF File Location Into a Character Field

    is your backend dbf or sql (mssql, MySQL, MariaDB) ?

  5. #5
    Member
    Real Name
    Bob M
    Join Date
    Dec 2001
    Posts
    513

    Default Re: Capturing PDF File Location Into a Character Field

    By backend, are you referring to where the files reside on the computer? If so, files are on One Drive in specific folders related to unique customers and already in pdf format. I can open them from A5 but need help to link to them on One Drive so I can view from my CMS.

    I currently have a vendor provided (at a hefty cost) CMS package where I upload the files from that drive. I am creating my own CMS with A5 and want to preserve all the files as related to specific customers.

  6. #6
    "Certified" Alphaholic
    Real Name
    Gregg Schmidt
    Join Date
    Mar 2001
    Location
    Milwaukee
    Posts
    1,012

    Default Re: Capturing PDF File Location Into a Character Field

    are you using Alpha's DBF tables, or are you using some type of sql?

    What does your connection string look like ?

  7. #7
    Member
    Real Name
    Bob M
    Join Date
    Dec 2001
    Posts
    513

    Default Re: Capturing PDF File Location Into a Character Field

    Alpha DBF tables to store the link as well as find the files.

    Connection string? That is a term I am not familiar with.

  8. #8
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    24,899

    Default Re: Capturing PDF File Location Into a Character Field

    You are using the action script element Prompt for a filename? Do you want the result of that prompt stored in a new record in the browse or as a change to an existing record? This should do either.

    theset.zip
    Last edited by Stan Mathews; 05-12-2018 at 09:25 AM.
    There can be only one.

  9. #9
    Member
    Real Name
    Bob M
    Join Date
    Dec 2001
    Posts
    513

    Default Re: Capturing PDF File Location Into a Character Field

    Stan, the record will be/is always pre-existing. And each parent level record will have anywhere from 1- 100 or more pdf files in the appropriate field (many files per one parent record).

  10. #10
    Member
    Real Name
    Bob M
    Join Date
    Dec 2001
    Posts
    513

    Default Re: Capturing PDF File Location Into a Character Field

    Stan,

    After I unzip, where should I place the appropriate cdx file? Which one does what?

    Thanks

  11. #11
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    24,899

    Default Re: Capturing PDF File Location Into a Character Field

    Don't know what went wrong with the zip creation. Trying again.


    theset.zip

    Should have two tables and a set definition.
    There can be only one.

  12. #12
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    24,899

    Default Re: Capturing PDF File Location Into a Character Field

    Added Action script versions of the button scripts.

    theset.zip
    There can be only one.

Similar Threads

  1. Export a character field containing Line-Feed to a .CSV file
    By Farzadalpa in forum Windows Desktop Applications
    Replies: 10
    Last Post: 03-04-2016, 01:41 PM
  2. Easy way to display PDF file in web browser per file location listed in grid
    By clankford in forum Mobile & Browser Applications
    Replies: 4
    Last Post: 10-26-2015, 06:26 AM
  3. Getting the folder location on file upload and file download javascript
    By acceptthis in forum Application Server Version 11 - Web/Browser Applications
    Replies: 3
    Last Post: 03-09-2013, 06:00 PM
  4. Capturing the newly create file name after file.watch_create() trigger.
    By bergmd in forum Alpha Five Version 10 - Desktop Applications
    Replies: 2
    Last Post: 05-25-2011, 02:25 PM
  5. 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

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
  •