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 do I include all phone numbers when sending text email to cell phone

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

    How do I include all phone numbers when sending text email to cell phone

    I am trying to send appointments to my technicians via email. I can send name, address, etc. but since phone numbers are in "phonenumber.dbf" linked by "custid" I am lost on how to send them along with other info.

    I can use browse list on reports, forms etc. but I need to send simple text msg to cell phones.. Final format must be like:

    Williams, Joe 123 Apple St #25, Concord, CA 94521, 858-555-1212hm, 619-555-1212cell, 760-555-1212Auth, (+other #'s if they exist) Refrigerator No Cool Monday 2-4pm

    Sorry if the answer is in this forum somewhere, but I can't find it..

    Perry

    #2
    How do I include all phone numbers when sending text email to cell phone

    I am trying to send appointments to my technicians via email. I can send name, address, etc. but since phone numbers are in "phonenumber.dbf" linked by "custid" I am lost on how to send them along with other info.

    I can use browse list on reports, forms etc. but I need to send simple text msg to cell phones.. Final format must be like:

    Williams, Joe 123 Apple St #25, Concord, CA 94521, 858-555-1212hm, 619-555-1212cell, 760-555-1212Auth, (+other #'s if they exist) Refrigerator No Cool Monday 2-4pm

    Sorry if the answer is in this forum somewhere, but I can't find it..

    Perry

    Comment


      #3
      Re: How do I include all phone numbers when sending text email to cell phone

      If you expect only one telephone number (1 to 1), you'd use the LOOKUP() or LOOKUPC() functions. But I think you expect more than one in the table, so I can think of two ways to do this:

      1) use "fetch_find() and fetch_next() in a loop to find tele#'s on custid. Build the list.

      2) use an array method like below:

      Code:
      dim custid
      dim tbl as P
      dim count as N
      dim indx as P
      tbl = table.open("phonenumber")
      query.filter = "custid="+quote(custid)
      indx = tbl.query_create()
      count = indx.records_get()
      indx.close()
      tbl.close()
      dim a[count] as P
      a.initialize_from_table("phonenumber","custid="+quote(custid))
      list = crlf_to_comma(a.dump_properties("Phonenumber"))
      list should be your list of related telephone numbers separated by a comma.

      If you need a list of all of the carriers email addresses to process text messaging, I have a complete list that includes how many characters are allowed, the email address and any special formatting reqd (none for most).
      Steve Wood
      See my profile on IADN

      Comment


        #4
        Re: How do I include all phone numbers when sending text email to cell phone

        Originally posted by perry9999 View Post
        I can send name, address, etc. but since phone numbers are in "phonenumber.dbf" linked by "custid" I am lost on how to send them along with other info.
        How are you sending what you are sending now?

        I'm guessing you need to look at the section of Email, Send Table Data in the help files - the section on Using fields from child tables in sets.

        Using Fields from Child Tables in Sets

        The email client lets you insert fields from any table or set into the body of the email message, including sets which have one-to-many relationships. You insert a command in the body of the email instructing Alpha Five to loop over all of the child records in a one-to-many child table. The syntax of the command is:

        [.

        ONE_MANY

        :

        tablename

        ]
        put field placeholder from the child table here
        [.
        END_ONE_MANY
        ]


        For example, the template email confirmation for the Invoice Form in AlphaSports could be designed as follows:

        Dear <<Customer->

        Firstname|F

        >>:



        Thank you very much for your order. We really appreciate your business.
        You ordered the following items:



        [.

        ONE_MANY

        :

        Invoice_Items

        ]
        <<
        Invoice_Items-
        >Quantity||5|0>> <<Product->
        Description|
        >>
        [.
        END_ONE_MANY
        ]

        Your order total is <<Total.value|$(|10|2>>. We will ship your order in 2 business days on <<
        add_bus_days(Date
        ,2)|3>>.

        Sincerely

        The AlphaSports Team


        To insert the [.

        ONE_MANY

        ] command into an email message, click the Insert Command button on the Email Client dialog, and select One to Many in the list of commands.

        Which should do what you want when you have created the appropriate set.
        There can be only one.

        Comment


          #5
          Re: How do I include all phone numbers when sending text email to cell phone

          Another way to get the external numbers is as follows:

          vFeeList=table.external_record_content_get("[PathAlias.ADB_Path]\Fees","alltrim(Fee_type)+\" \"+alltrim(str(Fee_Amt,9,2,\"$(\"))","","Ev_Id="+quote(session.Ev.Id))

          This example is taking an event id and creating a list of event types and event fee amounts out of an external table filtered on the event id.

          You could then simply concat this variable in your email message.

          Pat
          Pat Bremkamp
          MindKicks Consulting

          Comment


            #6
            Re: How do I include all phone numbers when sending text email to cell phone

            right now, I am using a "nearly dead" alpha 4v3 flat file database in dos.

            I used the ONE-MANY format, and that works, but only when I let the button on my form bring up the "Send and Email" window with all the <<lastname>><<address>> and ONE-Many gibberish showing in message pane.. I am afraid that the end users (my dispatchers) will be confused, or play with this stuff.. I prefer "idiot proof" operation..

            When I set the email option (using action scripting) to "Do Not Open Alpha Five Email Client, Just send message.."

            I get this as my email:

            <<alltrim(Jobs->Jobid)+" "+alltrim(Appointments->Calltype)+"
            "+alltrim(Lastfirstorcompanyname)+" "+alltrim(Addressnumber)+"
            "+alltrim(Addressstreet)>>[.ONE_MANY:Phonenumbers]<<Phonenumbers->Phonenumber|>><<Phonenumbers->
            Phonetype|>><<Phonenumbers->Askfor|>>[.END_ONE_MANY]


            Sorry, the other solutions provided by Steve Wood and Pat Bremkamp were way over my head..

            Help?

            Comment


              #7
              Re: How do I include all phone numbers when sending text email to cell phone

              Originally posted by perry9999 View Post
              right now, I am using a "nearly dead" alpha 4v3 flat file database in dos.
              Many here have experience with older Alpha versions but you might get more help if you post in one of the A4 forums.
              There can be only one.

              Comment


                #8
                Re: How do I include all phone numbers when sending text email to cell phone

                Sorry Stan, you asked how I currently send phone numbers.. That's with A4v3.. I am attempting to replace that with my new Alpha5v7.. I am working on my Alpha5v7 Database.. Not that old dinosaur that is stinking up my office (A4v3)

                when I convert and play with inline basic, I find:

                (email_client) sends data, but brings up client first (unnecessary, and not good for my use)

                (email_send) sends <<this stuff>> instead of data:
                Last edited by perry9999; 08-01-2007, 05:57 PM.

                Comment


                  #9
                  Re: How do I include all phone numbers when sending text email to cell phone

                  You are talking a bit over my head, but here's where I got.. I created the code object, and plugged in all the values, and now I can run it without error:
                  Code:
                  dim custid
                  dim tbl as P
                  dim count as N
                  dim indx as P
                  
                  DIM customerid AS C
                  customerid = 7
                  
                  tbl = table.open("phonenumbers")
                  query.filter = "customerid="+quote(customerid)
                  indx = tbl.query_create()
                  count = indx.records_get()
                  indx.close()
                  tbl.close()
                  dim a[count] as P
                  dim global list as c
                  a.initialize_from_table("phonenumbers","Customerid="+quote(Customerid))
                  list = crlf_to_comma(a.dump_properties("Phonenumbers"))
                  Now how do I get this "list" into a variable or email?
                  Is there some way to see the results?
                  I plugged in "Customerid = 7" as a test. Customerid field is a character field, length of 10 if that matters.

                  Sorry, I am new at this. Your help is greatly appreciated.
                  Last edited by AaronBBrown; 08-02-2007, 09:41 AM.

                  Comment


                    #10
                    Re: How do I include all phone numbers when sending text email to cell phone

                    A quick way to see the result is:

                    msgbox(list)


                    Or you can copy-paste the code into Interactive, and see the results with:

                    ?list

                    I don't know how the rest of your code looks that sends the email to the cell, but I would guess you are using ActionScript> SendEmail. If so, you'd need an Action prior to sending your email that populated a variable (the List above) with the phone numbers, then use that variable in the xbasic you write for the Message part of the email.
                    Steve Wood
                    See my profile on IADN

                    Comment


                      #11
                      Re: How do I include all phone numbers when sending text email to cell phone

                      Originally posted by perry9999 View Post
                      I plugged in "Customerid = 7" as a test.
                      The expression, given that customerid is a character field, would be

                      "Customerid = '7' "

                      or

                      "Customerid = \"7\" "

                      You take a report filter type expression

                      Customerid = "7"

                      Surround the whole with quotes

                      "Customerid = "7" "

                      Then do something to let Alpha know that the second quote does not end the expression.

                      Adding Quote Characters

                      If you need to include a quote in an expression, use a backslash to escape the quote.

                      my_var = "He said \"Hello, how are you?\""

                      ? my_var

                      = He said "Hello, how are you?"


                      or you can use chr(34), such as:

                      my_var = "He said " + chr(34) + "Hello, how are you?" + chr(34)


                      and finally, you can use the QUOTE() function:

                      my_var = "He said " + quote("Hello, how are you?")


                      All of these give you the same end result, so it's a matter of personal preference.


                      And really finally finally, you can use single quotes....

                      my_var = "He said 'Hello, how are you?' "
                      There can be only one.

                      Comment

                      Working...
                      X