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

Creating link to file on network

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

    #16
    Re: Creating link to file on network

    I just did this in the interactive (it should have the same result on your machine if you make the same choice).

    tst = ui_get_file("Testing","Bitmap (*.bmp)","C:\windows")
    ? tst
    = "C:\WINDOWS\Greenstone.bmp"

    On your form button onpush code you would use (for example)

    field_objectname.value = ui_get_file("Testing","Bitmap (*.bmp)","C:\windows")

    When you push the button and make a choice, the result will be stored in the field.
    There can be only one.

    Comment


      #17
      Re: Creating link to file on network

      test.jpg

      Comment


        #18
        Re: Creating link to file on network

        Thanks, guys. Helps me to understand what you're wrestling with.

        Comment


          #19
          Re: Creating link to file on network

          Originally posted by Stan Mathews View Post
          I just did this in the interactive (it should have the same result on your machine if you make the same choice).

          tst = ui_get_file("Testing","Bitmap (*.bmp)","C:\windows")
          ? tst
          = "C:\WINDOWS\Greenstone.bmp"

          On your form button onpush code you would use (for example)

          field_objectname.value = ui_get_file("Testing","Bitmap (*.bmp)","C:\windows")

          When you push the button and make a choice, the result will be stored in the field.
          Stan, I'm not sure if we're on the same page on this or not. So I pasted the image you see following, which I want to explain. Then you can tell me if what you're saying delivers what I'm after.

          I wasn't sure how to get a bigger size of the jpg into a message; haven't done it before. But if you click on it, you'll see it blown up. It's a snippet of the screen where I want the user to store the link (path+file name). You see a field title "Proposal link". Following that is the long URL field. If I have the full path and file name of the proposal file (typically an Excel file), then by clicking the right end of the field (you can't see the icon in this picture), it will open up the Excel file. You see to the right of the URL field is a button that says "Browse". If you click on it, you bring up Windows explorer on the S drive. The user navigates to the point of identifying the file whose path and file name we would like to be pasted into the URL field. At this point, the ideal would be to click on the file and voila, the full path and file name would be copied into the URL field. There are applications that do it this way, and I wanted to emulate it.

          So, does your example above do this? You have parameters in your ui_get_file. One is a name, "Testing". Another is a file type, "BMP". We don't want the user getting into any of this. This needs to be as simple as "click on the file that has your proposal, and it's link will be pasted into the URL field". Can ui_get_file be rigged to work this way? Hope so. You'll be my hero of the day.

          Jeff

          Comment


            #20
            Re: Creating link to file on network

            You see to the right of the URL field is a button that says "Browse". If you click on it, you bring up Windows explorer on the S drive.
            The same as if you use ui_get_file except if you use ui_get_file() you can capture the choice and you can customise the explorer window.


            You have parameters in your ui_get_file. One is a name, "Testing". Another is a file type, "BMP".
            Heve you ever heard of or experienced before someone giving you an example? The parameters are there in ui_get_file() so that you can customise the explorer window to your own needs. If you want it to show Excel files you would use

            ui_get_file("Proposals","Excel (*..xls)","C:\windows")

            and change "C:\windows" to whatever directory you want the user to be led to to start in. If you want to open the S drive you would

            ui_get_file("Proposals","Excel (*..xls)","S:\\")
            There can be only one.

            Comment


              #21
              Re: Creating link to file on network

              Jeff,
              You have been given what you need. ui_get_file(). Use it, learn it, it's what you want. I am developing a project management application. I have this function all over the place, selecting scanned vendor invoices,customer orders, scanned contracts, etc,etc.

              Code:
              'set the default file to begin navigation
                 dim vfile_path as C=a5.get_path()+chr(92)+"documents"+chr(92)
              'set the variable to collect the chosen file path
                  dim vfile_pick as C
                  vfile_pick=ui_get_file("File Search","*.xls",vfile_path)
                     if vfile_pick=""
                         end
                     end if
              'write the file selection to the form field
                   parentform:proposal_link.value=vfile_pick
              Mike W
              __________________________
              "I rebel in at least small things to express to the world that I have not completely surrendered"

              Comment


                #22
                Re: Creating link to file on network

                Originally posted by Mike Wilson View Post
                Jeff,
                You have been given what you need. ui_get_file(). Use it, learn it, it's what you want. I am developing a project management application. I have this function all over the place, selecting scanned vendor invoices,customer orders, scanned contracts, etc,etc.

                Code:
                'set the default file to begin navigation
                   dim vfile_path as C=a5.get_path()+chr(92)+"documents"+chr(92)
                'set the variable to collect the chosen file path
                    dim vfile_pick as C
                    vfile_pick=ui_get_file("File Search","*.xls",vfile_path)
                       if vfile_pick=""
                           end
                       end if
                'write the file selection to the form field
                     parentform:proposal_link.value=vfile_pick
                Mike,

                Thank you for this specific example. I'm going to try it and see if it does what I'm after, which is as follows. The user clicks on a button to bring up Windows explorer and browses the network to find the file of interest. The user then clicks on the file of interest and its full link is copied into the URL field which is set up for this purpose.

                So far, my approach, which is not too bad but not as good as the one I described, is to have the user shift-rightclick on the selected file, which brings up a menu with "Copy as path" command. This captures the full path and file name to the clipboard. Then it's just a matter of pasting this to the URL field. If ui_get_file will make this a one-click operation...well, you can't get better than one click, so my hat will be off to you.

                Thanks.

                Jeff

                Comment


                  #23
                  Re: Creating link to file on network

                  Jeff
                  If you try what Mike gave you, you will find that vfile_pick variable contains the path and file name.
                  That makes the file directly accessible on the network - as a NRL - network resource locator. What you asked for I think?
                  Do you specifically need IP address as the path of the resource to be fetched ? Universal (URL) to be used by a Web browser?

                  Comment


                    #24
                    Re: Creating link to file on network

                    Originally posted by Jeff Fried View Post
                    Mike,

                    Thank you for this specific example. I'm going to try it and see if it does what I'm after, which is as follows. The user clicks on a button to bring up Windows explorer and browses the network to find the file of interest. The user then clicks on the file of interest and its full link is copied into the URL field which is set up for this purpose.

                    So far, my approach, which is not too bad but not as good as the one I described, is to have the user shift-rightclick on the selected file, which brings up a menu with "Copy as path" command. This captures the full path and file name to the clipboard. Then it's just a matter of pasting this to the URL field. If ui_get_file will make this a one-click operation...well, you can't get better than one click, so my hat will be off to you.

                    Thanks.

                    Jeff
                    Mike,

                    I'll be darned. It works exactly the way I want it to work. Your example, with a slight modification at my end, was perfect and opened my eyes to new possibilities for this command. I can see why you would use it extensively for your project management applications.

                    Thank you very much for coming to my aid.

                    And Ray, the IP is not necessary in this situation but thank you for opening that up as a possibility.

                    Alpha Five continues to impress, even after 20 or so years. So do some of the Alphaholics who jump on here with a sincere interest in helping others to solve problems. Kudos!

                    Jeff

                    Comment


                      #25
                      Re: Creating link to file on network

                      Originally posted by Mike Wilson View Post
                      Jeff,
                      You have been given what you need. ui_get_file(). Use it, learn it, it's what you want. I am developing a project management application. I have this function all over the place, selecting scanned vendor invoices,customer orders, scanned contracts, etc,etc.

                      Code:
                      'set the default file to begin navigation
                         dim vfile_path as C=a5.get_path()+chr(92)+"documents"+chr(92)
                      'set the variable to collect the chosen file path
                          dim vfile_pick as C
                          vfile_pick=ui_get_file("File Search","*.xls",vfile_path)
                             if vfile_pick=""
                                 end
                             end if
                      'write the file selection to the form field
                           parentform:proposal_link.value=vfile_pick
                      Mike,

                      I'd like to ask you one more thing about this code. I've been trying to figure it out but haven't gotten there. It's probably very simple, but it escapes me.

                      Below is the code as I have it running. The one thing I would like to do is begin each search at the root of the S drive. Right now, it starts at the last selected directory. What do I need to add or change? Thank you.

                      'set the default file to begin navigation
                      dim vfile_path as C=a5.get_path()+chr(92)+"documents"+chr(92)
                      'set the variable to collect the chosen file path
                      dim vfile_pick as C
                      vfile_pick=ui_get_file("File Search","*.*",vfile_path)
                      if vfile_pick=""
                      end
                      end if
                      'write the file selection to the form field
                      parentform:linktoprop.value=vfile_pick

                      Jeff

                      Comment


                        #26
                        Re: Creating link to file on network

                        Mike,

                        Never mind about that last request for the starting directory. It turns out the answer was supplied by Stan's comments. Thanks anyhow. And thanks, Stan.

                        Jeff

                        Comment


                          #27
                          Re: Creating link to file on network

                          Just one more thing about this that had me confused, and I don't know why the syntax is the way it is. The reference to the root of the S drive is correct as "S:\\". I would have thought it to be "S:\" as the traditional way to reference the path on a local drive or server, but that doesn't work. If a directory is named "temp" on S, then I would expect the path name to be "S:\temp\". I don't know why the extra "\" unless it's a URL reference.

                          The other thing that was counter-intuitive was the wild card reference to all files. Here again the traditional way to express it is "*.*". I don't understand why the correct syntax for this is "*..*". I wish there were something in the docs that explained this, and the rationale for this, but if there is, I haven't found it.

                          Again, thanks to all contributors. This seemingly minor capability is going to get a lot of use. I just never came upon the need until this particular project. Now I can see how to apply it to other projects. I know some clients who are just going to love this.

                          Jeff

                          Comment


                            #28
                            Re: Creating link to file on network

                            If a directory is named "temp" on S, then I would expect the path name to be "S:\temp\".
                            The backslash in Alpha is also the escape character. To explicitly end a character string with a backslash you must escape it \\ otherwise you have escaped the closing quote mark and not terminated the string. This is in the docs under backslash.

                            Here again the traditional way to express it is "*.*". I don't understand why the correct syntax for this is "*..*".
                            The correct syntax is "*.*", don't know what you could have experienced that suggested otherwise.
                            There can be only one.

                            Comment


                              #29
                              Re: Creating link to file on network

                              Originally posted by Stan Mathews View Post
                              The backslash in Alpha is also the escape character. To explicitly end a character string with a backslash you must escape it \\ otherwise you have escaped the closing quote mark and not terminated the string. This is in the docs under backslash.

                              The correct syntax is "*.*", don't know what you could have experienced that suggested otherwise.
                              Stan,

                              Good information. Thanks for this. The *..* was picked up from your example. Obviously a typo "ui_get_file("Proposals","Excel (*..xls)","S:\\") "

                              Jeff

                              Comment


                                #30
                                Re: Creating link to file on network

                                I now have a link field in a URL-type field, where the link to a file on the network brings up that file when you click on the right side of the URL field.

                                Do someone know of a way where I can click anywhere on the field, instead of the right side of the field, to execute the link?

                                Thanks.

                                Jeff

                                Comment

                                Working...
                                X