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

Is Alpha able to create a doc with attachments

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

    Is Alpha able to create a doc with attachments

    Before I go researching too far, maybe someone can answer if this is possible.

    My client wants to know if Alpha is able to create an email template then go and find and attach multiple non-Alpha files based on a currently viewd record fields value.

    I'm only just starting to read how to create the email template, but I haven't found anything on how to choose a directory and grab the attachements based on a field value.

    Example.
    Field1 - Site_ID = "TORON000"
    Field2 - Address = "123 Queen St"
    Field3 - Date1 = "Jan 25, 2010"
    Field4 - Name = "Mr. Smith"
    Field5 - email = [email protected]

    Create a button so that - 'on push' a template email is generated to the name specified in Field5 and do the following


    To: "[email protected]"


    Hello "Mr Smith"
    In regards to Site "TORON000" we have reviewed the location and found "123 Queen St" to be satisfactory for the installation on "Jan 25, 2010" and are including these documents containing photos and specifications



    Automatically look for a directory named same as the field and pull the files within them

    ("S:\"+alltrim(Site_Id.value)\"+alltrim(Site_Id.value)+".PDF")
    ("S:\"+alltrim(Site_Id.value)\"+alltrim(Site_ID.value)+".JPG")

    = S:\TORON000\TORON000.PDF
    = S:\TORON000\TORON000.JPG


    I learned and used the last two command lines from Stan to open files for viewing, can they also be used for attaching documents

    #2
    Re: Is Alpha able to create a doc with attachments

    Yes, look at the function EMAIL_SEND()
    Garry

    Comment


      #3
      Re: Is Alpha able to create a doc with attachments

      Yes, I'm viewing that help
      Not sure if I don't see it or am not typing the command properly.

      It's making sure to choose files from the right directory that I'm having difficulty with. I won't be choosing the same path each time. So it's several files from different locations that are constantly changing.

      The only thing I can guarantee Alpha, is that the folder name is in a specificed root and each folder is named based off a field value followed by text.

      Will Alpha look for a directory by the same name, or are paths fixed.

      I'll keep working at it... Nothing great is easy.

      Comment


        #4
        Re: Is Alpha able to create a doc with attachments

        Alpha must be told where to look or have a formula so that it knows what to look for.

        In your case it is always s:\ and then a folder named as your Site_ID is the folder name and you want every file from that directory then no problems. If you need to look only for file with name = site_id.* then again this can be done.
        If it is something else maybe look at filefind.get() or look at all filefind functions including filefind.list_new_files()

        All this info is in the help files. Did you look at these before posting?

        Garry

        Comment


          #5
          Re: Is Alpha able to create a doc with attachments

          I learned a good bit of how to construct such things by experimenting in the interactive window. Still play there a bit to refresh my memory on less used functions.

          Example below....

          Code:
          lst = filefind.get("c:\temp\*.txt",FILE_FIND_NORMAL,"PN")
          ? lst
          = c:\temp\lyrics in a little while.txt
          c:\temp\lyrics one hundred years.txt
          [COLOR="Blue"]'sweet, filefind works[/COLOR]
          
          lst2 = filefind.get("c:\temp\*.bmp",FILE_FIND_NORMAL,"PN")
          ? lst2
          = "c:\temp\HOUCHENS INDUS logobmp.bmp"
          [COLOR="blue"]'twice in a row[/COLOR]
          
          mast_list = lst + lst2
          [COLOR="blue"]'what if I wanted two file types?[/COLOR]
          
          ? mast_list
          = c:\temp\lyrics in a little while.txt
          c:\temp\lyrics one hundred years.txtc:\temp\HOUCHENS INDUS logobmp.bmp
          [COLOR="blue"]'oops, need a crlf() in there[/COLOR]
          
          mast_list = lst + crlf()+ lst2
          ? mast_list
          = c:\temp\lyrics in a little while.txt
          c:\temp\lyrics one hundred years.txt
          c:\temp\HOUCHENS INDUS logobmp.bmp
          [COLOR="blue"]'that's the ticket[/COLOR]
          
          tbars = filefind.get("c:\temp\toolbars.*",FILE_FIND_NORMAL,"PN")
          ? tbars
          = c:\temp\Toolbars.ALB
          c:\temp\Toolbars.ALM
          c:\temp\Toolbars.Alx
          [COLOR="blue"]'now we're getting somewhere[/COLOR]
          
          [COLOR="blue"]'how to replace the fixed values with variables?
          'step 1[/COLOR]
          rt_dir = "c:\temp"
          tbars = filefind.get(rt_dir+"\toolbars.*",FILE_FIND_NORMAL,"PN")
          ? tbars
          = c:\temp\Toolbars.ALB
          c:\temp\Toolbars.ALM
          c:\temp\Toolbars.Alx
          [COLOR="blue"]'eureka[/COLOR]
          
          [COLOR="blue"]'step 2[/COLOR]
          filname = "toolbars"
          tbars = filefind.get(rt_dir+chr(92)+filname+".*",FILE_FIND_NORMAL,"PN")
          ? tbars
          = c:\temp\Toolbars.ALB
          c:\temp\Toolbars.ALM
          c:\temp\Toolbars.Alx
          [COLOR="blue"]'double eureka[/COLOR]
          There can be only one.

          Comment


            #6
            Re: Is Alpha able to create a doc with attachments

            Here is an example I had in my files I modified slightly to fit your request. Hope it helps.
            Mike W
            __________________________
            "I rebel in at least small things to express to the world that I have not completely surrendered"

            Comment


              #7
              Re: Is Alpha able to create a doc with attachments

              Originally posted by Garry Flanigan View Post
              Alpha must be told where to look or have a formula so that it knows what to look for.

              In your case it is always s:\ and then a folder named as your Site_ID is the folder name and you want every file from that directory then no problems. If you need to look only for file with name = site_id.* then again this can be done.
              If it is something else maybe look at filefind.get() or look at all filefind functions including filefind.list_new_files()

              All this info is in the help files. Did you look at these before posting?

              Garry

              Gary, I always try to look at help files before posting. I don't want to flood the forum with a question on every little thing, but i have to admit I tried to accomplish my goal focusing on using email_send(). Stan and Mike gave me a good direction to research - filefind.get()

              Going forward to avoid the obvious, is there something you may be able to suggest that would be a good reference point, a manual I might purchase or a web site, I'm even willing to pay for a support package that will provide me diretional help. I don't want the technician to do the command for me, just tell me what command is best to use.

              I tried searching the forum, but finding the right words to bring up results can be difficult at times. Plus Alpha is so versitile, I don't think there is a manual that provides every instance of command uses.

              Comment


                #8
                Re: Is Alpha able to create a doc with attachments

                When trying to work out how to do something, I would suggest you start with the webhelp, Contents tab, References, Functions and Methods, Xbasic Functions and Methods Listed by Type

                Try to determine what type of function you need and select that line. Scan down through the descriptions to see if anything sounds like it would work. (make mental or physical notes of things that sound like they can be used later while you search,, possibly even click on some and print them out) Don't neglect the See Also links at the bottom of the listing.

                Screenshot is example of looking for File related entries.


                (Real easy for me to say because I know what I'm looking for.)
                There can be only one.

                Comment


                  #9
                  Re: Is Alpha able to create a doc with attachments

                  Originally posted by Garry Flanigan View Post
                  Alpha must be told where to look or have a formula so that it knows what to look for.

                  In your case it is always s:\ and then a folder named as your Site_ID is the folder name and you want every file from that directory then no problems. If you need to look only for file with name = site_id.* then again this can be done.
                  If it is something else maybe look at filefind.get() or look at all filefind functions including filefind.list_new_files()

                  All this info is in the help files. Did you look at these before posting?

                  Garry
                  Originally posted by Stan Mathews View Post
                  When trying to work out how to do something, I would suggest you start with the webhelp, Contents tab, References, Functions and Methods, Xbasic Functions and Methods Listed by Type

                  Try to determine what type of function you need and select that line. Scan down through the descriptions to see if anything sounds like it would work. (make mental or physical notes of things that sound like they can be used later while you search,, possibly even click on some and print them out) Don't neglect the See Also links at the bottom of the listing.

                  Screenshot is example of looking for File related entries.


                  (Real easy for me to say because I know what I'm looking for.)

                  Very good, I will try this method

                  Comment


                    #10
                    Re: Is Alpha able to create a doc with attachments

                    Originally posted by Stan Mathews View Post
                    When trying to work out how to do something, I would suggest you start with the webhelp, Contents tab, References, Functions and Methods, Xbasic Functions and Methods Listed by Type

                    Try to determine what type of function you need and select that line. Scan down through the descriptions to see if anything sounds like it would work. (make mental or physical notes of things that sound like they can be used later while you search,, possibly even click on some and print them out) Don't neglect the See Also links at the bottom of the listing.

                    Screenshot is example of looking for File related entries.


                    (Real easy for me to say because I know what I'm looking for.)

                    These are really great commands, shows what years of experience amounts to.

                    Comment


                      #11
                      Re: Is Alpha able to create a doc with attachments

                      Originally posted by Mike Wilson View Post
                      Here is an example I had in my files I modified slightly to fit your request. Hope it helps.

                      I like your example Mike, I'm learning a lot from it. Thank you

                      Comment

                      Working...
                      X