Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

reference image file and change the location

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    reference image file and change the location

    Hi,

    I have a client that he use my inventory database, is working also with the images. For semplify the database I used on the table the IMAGE FILE REFERENCE ; now he decided to change the phisical path of these images. As the Image file reference store the path of the images it ,is possible for me rewrite that path without insert all images and how ?


    Thank you for your help or comment

    Cristiano
    Cristiano
    [email protected]

    Skype: cris-do

    #2
    Re: reference image file and change the location

    Hi Cristiano,

    Just a quick thought, create a new C field with the new path. Use Update Operation to put in Path value.

    Create another new C field which would be calculated. The result is value of new field + Image field. Run Recalc.

    Change the image on the layout to the new field.

    This should not take more than 10 minutes.
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

    Comment


      #3
      Re: reference image file and change the location

      Originally posted by Keith Hubert View Post
      Hi Cristiano,

      Just a quick thought, create a new C field with the new path. Use Update Operation to put in Path value.

      Create another new C field which would be calculated. The result is value of new field + Image field. Run Recalc.

      Change the image on the layout to the new field.

      This should not take more than 10 minutes.
      Hi Keith,

      sorry but I do not understand create a new C ?? maybe is a new character Field ?
      and also, when I use the IMAGE FILE REFERENCE on the table I do not see the path but the image, could you make a sample ?

      thank you

      Cristiano
      Cristiano
      [email protected]

      Skype: cris-do

      Comment


        #4
        Re: reference image file and change the location

        Hi Cristiano,

        Yes that is Character field. And yes you are correct the image is displayed in the record, not the path. Which means my quick idea was not so good.

        How many records are there with images?
        Regards
        Keith Hubert
        Alpha Guild Member
        London.
        KHDB Management Systems
        Skype = keith.hubert


        For your day-to-day Needs, you Need an Alpha Database!

        Comment


          #5
          Re: reference image file and change the location

          Originally posted by Keith Hubert View Post
          Hi Cristiano,

          Yes that is Character field. And yes you are correct the image is displayed in the record, not the path. Which means my quick idea was not so good.

          How many records are there with images?
          Hi Keith there are more then 10.000 aricles and all with images.
          Cristiano
          [email protected]

          Skype: cris-do

          Comment


            #6
            Re: reference image file and change the location

            Hi Cristiano

            Add a field to your table that is a character field called for example "ifname"

            Using the filename parse functions extract just the filename into that new field from the image file reference field.

            (see FILE.FILENAME_PARSE() in the help file)


            Supposing your image reference for the original location is

            z:\shared\images\picture123.jpg

            and you wish to move the images to

            y:\images\inventory\picture123.jpg

            Use an update operation reset the image reference field content to "y:\images\inventory"+chr(92)+trim(ifname)

            In that way you can relocate your 10,000 images in a few seconds.

            For what its worth if I am building a table that I know will have image file reference field(s) I always add a field for each reference field that is a calculated field using the FILE.FILENAME_PARSE() function so the stripped down image file name is always available.

            Hope the above makes sense.

            Bob Whitaker.
            Bob Whitaker

            Comment


              #7
              Re: reference image file and change the location

              This help page on aliases may be of help
              Tim Kiebert
              Eagle Creek Citrus
              A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

              Comment


                #8
                Re: reference image file and change the location

                Originally posted by Bob Whitaker View Post
                Hi Cristiano

                Add a field to your table that is a character field called for example "ifname"

                Using the filename parse functions extract just the filename into that new field from the image file reference field.

                (see FILE.FILENAME_PARSE() in the help file)


                Supposing your image reference for the original location is

                z:\shared\images\picture123.jpg

                and you wish to move the images to

                y:\images\inventory\picture123.jpg

                Use an update operation reset the image reference field content to "y:\images\inventory"+chr(92)+trim(ifname)

                In that way you can relocate your 10,000 images in a few seconds.

                For what its worth if I am building a table that I know will have image file reference field(s) I always add a field for each reference field that is a calculated field using the FILE.FILENAME_PARSE() function so the stripped down image file name is always available.

                Hope the above makes sense.

                Bob Whitaker.
                Hi Bob,
                I tried but I failed to get what I wanted, could you please send me a sample to better understand where I wrong ?

                Thank you
                Cristiano
                [email protected]

                Skype: cris-do

                Comment


                  #9
                  Re: reference image file and change the location

                  To go along with Tim's post....use the alias route. It is not native when the image reference fields records are added. All subsequent adds need to be coded to use an Alias if you want to avoid this in the future as well. That means a custom routine to encode the Alias when adding records. This problem also occurs if you have a non network opttimized app with image ref fields and then optimize it. The workstations will no longer be able to see the photos because the optimization routine makes the workstations think the photos are on the local machine in the same relative path. Below is an example.


                  Code:
                  'Get pointer to table
                  dim tbl as p
                  'This is my photo table
                  tbl=table.open("mmp_photos")
                  
                  tbl.fetch_first()
                  DIM vimageref as C
                  DIM vthumbref as C
                  DIM vnewimagepath as C
                  DIM vnewthumbpath as C
                  tbl.batch_begin()
                  while .not. tbl.fetch_eof()
                  	
                  	'This gets the "Text" string of the photo location - there are 2 image refs in this table
                  	vimageref=a5_eval_expression(tbl.imagereff)
                  	vthumbref=a5_eval_expression(tbl.thumbreff)
                  ''**************  For MMP Photos ****************************************
                  	'Now strip out the part that is directory dependendent (see the Q:\QRplus below)
                  	'That's what I need to get rid of make make it an alias
                  	'The example below was for my needs - you will have to tweak to suit your directories
                  	IF substr(vimageref,1,9)="Q:\QRPlus"
                  		vnewimagepath="[MMPPhotos]"+substr(vimageref,21,len(vimageref))
                  		vnewthumbpath="[MMPPhotos]"+substr(vthumbref,21,len(vthumbref))
                  	ELSE
                  		vnewimagepath="[MMPPhotos]"+substr(vimageref,27,len(vimageref))
                  		vnewthumbpath="[MMPPhotos]"+substr(vthumbref,27,len(vthumbref))	
                  	end if
                  ''****************** End MMP Photos **************************************
                  'Now encode the image ref back but with an Alias
                  'Use the following settings for the MMP PHotos Table - Notice the different Alias from WO Photos
                  
                  	tbl.change_begin()
                  	tbl.Imagereff=filename_encode(vnewimagepath)
                  	tbl.Thumbreff=filename_encode(vnewthumbpath)
                  	tbl.change_end()
                  	
                  	
                  	tbl.fetch_next()
                  	end while
                  tbl.batch_end()
                  tbl.close()
                  Make sure you setup your alias prior to running this in the Setup menu in Alpha. After doing this if you ever wanted to change the location again - just change the alias (the subdirectory structure under the alias must remain the same however).

                  Regards,

                  Jeff

                  Comment

                  Working...
                  X