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

How to display a .jpg file in a JPG image field

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

  • How to display a .jpg file in a JPG image field

    I have a table with the following fields:

    Logonum Numeric 3 0
    Description Character 20 0
    Jpeg JPeg Image 10 0
    Filename Character 200 0
    After the user enters the filename I would like the JPG field to be automatically filled with the .jpg file that corresponds to that file.

    I cannot find any XBASIC that can do this. Currently the user must enter the filename, then go to the JPEG field and select the same file that they just entered in the filename field... less elegant than I like :-(

    How can I automatically have the JPEG image loaded from the 'filename'.jpg file specified in the filename field?

  • #2
    Re: How to display a .jpg file in a JPG image field

    A bit late, but there are 2 ways I do this,
    1 where the jpg name matches a value on the form. When the form is opened, if there is a corresponding file, it will be displayed.
    2 where the jpg file name is saved in a table. That requires selecting the jpg first though.

    In either event some business rules need to be in place to ensure that the jpg is there and named correctly for 1 above.
    See our Hybrid Option here;
    https://hybridapps.example-software.com/


    There are 3 things you can do in any situation;
    Live with it, Change it or Walk away from it.

    Comment


    • #3
      Re: How to display a .jpg file in a JPG image field

      Thanks Ted...
      I am doing both of these... They are WHAT I am doing... but I am trying to discover HOW to do the following:
      The .JPEG field on the form REQUIRES the user to enter a filename... but the field named 'filename' already contains the filename of the .jpg that I want to display in the JPEG field. I want to have the JPEG field automatically display the file specified in the filename field. This will avoid having the user enter the filename twice.

      Comment


      • #4
        Re: How to display a .jpg file in a JPG image field

        Then make the image field a default, where the image is from the value in the table field.
        The table field what creates is the default, or I may have misunderstood.
        If I have, please spell it out in more detail if you can.
        See our Hybrid Option here;
        https://hybridapps.example-software.com/


        There are 3 things you can do in any situation;
        Live with it, Change it or Walk away from it.

        Comment


        • #5
          Re: How to display a .jpg file in a JPG image field

          Thanks Ted...
          I tried putting a field rule on the jpeg field so that it defaulted to the value in the filename field... is that what you meant by 'make the image field a default'... sadly.. it doesn't work :-(

          Comment


          • #6
            Re: How to display a .jpg file in a JPG image field

            Can you show us the actual code you put in the default section please?

            You probably need this or similar in the default value.

            TRIM(SUBSTR(A5_QUALIFY_FILENAME(LOOKUPC
            ("Your Drive Letter",
            The JPEG ID,
            "The field you store the JPeg link in",
            "Jpeg",
            "Jpegid")),
            1,50))

            A bit like this

            TRIM(SUBSTR(A5_QUALIFY_FILENAME(LOOKUPC("C",abc,"abc","jpegtable","abc")),1,50))

            It is a case of qualifying the jpeg filename and setting it as the default.
            You might want to test for the file actually being there.
            Last edited by Ted Giles; 01-03-2019, 12:41 PM.
            See our Hybrid Option here;
            https://hybridapps.example-software.com/


            There are 3 things you can do in any situation;
            Live with it, Change it or Walk away from it.

            Comment


            • #7
              Re: How to display a .jpg file in a JPG image field

              Originally posted by Ted Giles View Post
              Can you show us the actual code you put in the default section please?

              You probably need this or similar in the default value.

              TRIM(SUBSTR(A5_QUALIFY_FILENAME(LOOKUPC
              ("Your Drive Letter",
              The JPEG ID,
              "The field you store the JPeg link in",
              "Jpeg",
              "Jpegid")),
              1,50))

              A bit like this

              TRIM(SUBSTR(A5_QUALIFY_FILENAME(LOOKUPC("C",abc,"abc","jpegtable","abc")),1,50))

              It is a case of qualifying the jpeg filename and setting it as the default.
              You might want to test for the file actually being there.

              Comment


              • #8
                Re: How to display a .jpg file in a JPG image field

                I have specified the field named FILENAME and also tried the TRIM(SUBSTR(A5_QUALIFY_FILENAME(LOOKUPC("C",Logonum,"filename","logospecs","Logonum")),1,50)) formula in the default for the field rule for the JPG fiels… neither works.

                Comment


                • #9
                  Re: How to display a .jpg file in a JPG image field

                  Then I have misunderstood the situation.
                  The best I can come up with is an alias in a browse, but it requires the user to select the image in the first place and then give it an alias.
                  I am unclear as to why you need to enter the image path as well as selecting an image to display.
                  Selecting the image will enable the image path to be established should you need it.
                  Changing the image will always take you back to the original folder and type.
                  See our Hybrid Option here;
                  https://hybridapps.example-software.com/


                  There are 3 things you can do in any situation;
                  Live with it, Change it or Walk away from it.

                  Comment


                  • #10
                    Re: How to display a .jpg file in a JPG image field

                    I have been following this thread. Image presentations within my major application is very extensive using multiple different strategies. What I can't figure out is what the problem being encountered by David is about, at all! At this juncture a tiny sample database example that shows the issues you are experiencing David is needed, because it may be me, but I just don't get what the problem is.
                    Mike W
                    __________________________
                    "I rebel in at least small things to express to the world that I have not completely surrendered"

                    Comment


                    • #11
                      Re: How to display a .jpg file in a JPG image field

                      The solution I have used for displaying graphics like this is an image file reference field. Then with an onchange event of the filename the image file reference field contains a jpg file with the name specified by the filename field.

                      Comment


                      • #12
                        Re: How to display a .jpg file in a JPG image field

                        Thanks Rob.
                        With an IRF, I have not found a way yet to populate the field without human intervention.
                        I still need to try Finians suggestion and that is on tomorrows schedule.

                        In an ideal world, the IRF would be populated automatically using the field default setting.
                        I've tried encoding and decoding the jpg image file name and cannot get the syntax correct.

                        My next option will be to create a table with a dummy record in it and link it into the set. Then maybe I can get the default to reference the image in the dummy field.

                        The work around at present is to use JPEG fields.
                        See our Hybrid Option here;
                        https://hybridapps.example-software.com/


                        There are 3 things you can do in any situation;
                        Live with it, Change it or Walk away from it.

                        Comment


                        • #13
                          Re: How to display a .jpg file in a JPG image field

                          Below is a screenshot of the set image file reference field genie.

                          The image filename syntax is: "H:\A5V11 Runtime\Shared path\Signatures\Sig "+rtrim(signed)+".JPG":
                          John smith's signature would be stored in folder "H:\A5V11 Runtime\Shared path\Signatures"
                          The signature JPG would be "Sig John Smith.jpg". and
                          "Signed" is a character field in the table.
                          "Sig1" is an image file reference field in the table
                          "Sig1" is also the form object pointing to IFRF "Sig1"

                          So I have a password protected action script that puts the name into the "Signed13" object (points to table field "Signed") and then the next action script sets the image file reference field "Sig1".

                          It is important to note (took me a while to figure out) that the field must be an image file refrence field and the action script to set it is specific for an IFRF - you cannot use a set text or set value function like you can to set the name in a character field. This work pretty reliably, and has all been done with two lines of action scripts.

                          Hope this is useful.


                          Capture.JPG

                          Comment


                          • #14
                            Re: How to display a .jpg file in a JPG image field

                            PS - I forgot to mention that I seemed to need an event to set the value. It can be an on-change from another field, or a specific "set image file name in linked image field" action script. But merely using a calculated value in the field is problematic it seems.

                            Rob.

                            Comment


                            • #15
                              Re: How to display a .jpg file in a JPG image field

                              Thanks Rob, I will explore.
                              See our Hybrid Option here;
                              https://hybridapps.example-software.com/


                              There are 3 things you can do in any situation;
                              Live with it, Change it or Walk away from it.

                              Comment

                              Working...
                              X