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

Fetch Current Record

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

    Fetch Current Record

    I have a script that copies a record from 1 table to another. In the script I use tbl_source.fetch_goto(3) - for testing purposes and when I use the script it copies record 3 from my current table to another table.

    I want to copy the "currently displayed" record on the form, not record 3. I cannot find help on how ro do this. There is fetch 1st, fetch last etc. but not current record.

    #2
    Re: Fetch Current Record

    Rudy,

    From the help file on <TBL>.COPY_RECORD_TO()
    there is the following example

    Code:
    dim tbl as P
     tbl_source = table.current()
     tbl_source.fetch_goto(3)
     on error goto failed_to_copy
     result = tbl_source.copy_record_to("OLD_CUSTOMERS")
     on error goto 0
     if result then
         ui_msg_box("Result","Record was copied")
     end if
     end
     failed_to_copy:
         ui_msg_box("Record not copied.", error_text_get(error_code_get()))
     end
    if you leave out the tbl_source.fetch_goto(3) from the code it will copy the record that currently has focus, obviously you need to change the "old_customers" table to your own resulting table.

    Comment


      #3
      Re: Fetch Current Record

      Lance,
      That is what I used. I commented that line out and tried to execute the code from the Control Panel and got an error message.

      I tried this morning executing it from the form and it was fine. Now I realkize when I was in the Control Panel. there was nothing in focus.

      It was 3am here and I was delerious.

      Thanks for the reply.
      Rudy

      Comment


        #4
        Re: Fetch Current Record

        Originally posted by Rudy16 View Post
        I have a script that copies a record from 1 table to another. In the script I use tbl_source.fetch_goto(3) - for testing purposes and when I use the script it copies record 3 from my current table to another table.

        I want to copy the "currently displayed" record on the form, not record 3. I cannot find help on how ro do this. There is fetch 1st, fetch last etc. but not current record.
        Code:
        dim tbl as p 
        tbl = table.current()
        dim currentRecNo as n 
        currentRecNo = tbl.recno()

        Comment


          #5
          Re: Fetch Current Record

          Thanks Selwyn.

          I simply want to select a letter from the letter table, mark the residents that the letter applies to,and print that selected letter to all marked residents. I already have a resident embedded browse with a routine to mark records. There is no realitionship between the resident table and letter table.

          I set up a 2nd common letter table ( 1 entry only) and on my main letter form I have a button that copies the current focused letter to the common letter table. The report will use the common letter table entry.

          Now I want to create a report that uses the common letter table and the resident table to pull the first name, last name, street # and street asddress.

          My letter table has:
          letter #
          letter desc
          header (which is an RTF Memo Field)
          Body ( which is also an RTF Memo Field)
          Footer ( which is an RTF Memo Field)

          I want to merge the first name, last name, street # and street address from the resident table into the header and body of the report.

          There is no relasionship between the 2 tables.

          I'm having a real hard time trying to figure this out. Is it possible that you can recommend a procedure.

          I posted this in another thread and a few people were kind enough to give their opinion's however, I can't apply their logic ro my thought process.

          Thanks,
          Rudy

          Comment


            #6
            Re: Fetch Current Record

            Originally posted by Rudy16 View Post
            Thanks Selwyn.

            I simply want to select a letter from the letter table, mark the residents that the letter applies to,and print that selected letter to all marked residents. I already have a resident embedded browse with a routine to mark records. There is no realitionship between the resident table and letter table.

            I set up a 2nd common letter table ( 1 entry only) and on my main letter form I have a button that copies the current focused letter to the common letter table. The report will use the common letter table entry.

            Now I want to create a report that uses the common letter table and the resident table to pull the first name, last name, street # and street asddress.

            My letter table has:
            letter #
            letter desc
            header (which is an RTF Memo Field)
            Body ( which is also an RTF Memo Field)
            Footer ( which is an RTF Memo Field)

            I want to merge the first name, last name, street # and street address from the resident table into the header and body of the report.

            There is no relasionship between the 2 tables.

            I'm having a real hard time trying to figure this out. Is it possible that you can recommend a procedure.

            I posted this in another thread and a few people were kind enough to give their opinion's however, I can't apply their logic ro my thought process.

            Thanks,
            Rudy

            sorry. you are confusing me with too much detail.

            i don't follow your question.

            the problem is you are using terms which may be meaningful to you, but are not to me.

            for example, you talk about a 'letter table'. don't know what that means.

            can you try to rephrase your question, being very specific about your terminology, but without overwhelming us with details that are specific to your application.

            Comment


              #7
              Re: Fetch Current Record

              I'll do my best.
              This application will be used by the Officers of our Comminity Association.

              I have a table that contains letters that the user creates, such as a Welcome Letter, a Quarterly Dues Late Payment Letter, etc. Each record in the table has a Letter #, a Letter Description, a Page Header, Body and Page Footer.

              Is there a way the user can pick one of the letters that he/she want's to send out and then mark each resident in the resident table and finally print the picked letter for all marked residents.

              Im having a hard time explaining it so if this is not clear I can send you a little test db.

              Thanks

              I've spent over 5 hours trying to figure this out anf I'm sure it's a 5 minute routine for you pro's.



              I

              Comment


                #8
                Re: Fetch Current Record

                Rudy, others take a different approach to this kind of application.

                Instead of storing the letters in a table, they create a separate report layout for each letter. In the report layouts they include the fields that hold the resident's name, address, city, state, zip, membership number, etc.

                They base the report layout on the table that contains the resident's contact information.

                They "mark" the residents who should receive the letter, and then run the report with a filter that only includes residents whose records are marked().

                -- tom

                Comment


                  #9
                  Re: Fetch Current Record

                  Hi Tom. The above approach is not dynamic, at least I don't think it is. I created seperate letters and had a form with a button's that printed a specific letter. That was easy for me to do.

                  After I turn the system over to the user, he/she may think of new letters that they want to add to the system. I would have to create them here at home, update the forms menu to include the newly created reports and re-install it back on the clubhouse computer.

                  After I install the system at the clubhouse, I want to give the user the ability to create as many letters as he/she wants without calling me.

                  This is why I created a "common" letter table which the user can copy to from the original letter table that has "all" letters created.

                  AFter the copy, I want the user to mark all residents to receive the letter and produce them from the common letter table which has only 1 entry.

                  What do you think?

                  Comment


                    #10
                    Re: Fetch Current Record

                    You say:

                    I have a table that contains letters that the user creates, such as a Welcome Letter, a Quarterly Dues Late Payment Letter, etc. Each record in the table has a Letter #, a Letter Description, a Page Header, Body and Page Footer.

                    I guess this is confusing me. When you say 'Letter' I immediately think of the 'Letter Layout' (which you create by going to the 'Letters' tab on the Control Panel.

                    Are you not using 'Letter' layout?

                    If you are using 'Letter' layouts, then what is the purpose of the Page Header, Body and Footer fields in your table?

                    Comment


                      #11
                      Re: Fetch Current Record

                      Seywl,
                      I've attached a couple of screens and will try to explain them to you.

                      BatchLetterPrint Screen
                      UnPaid Dues Letter is a "Letter Layout" I tag the residents, click on "Un-Paid Dues Letter" an get an Un_Paid Dues Report (works Fine -see Report). Using this method, If the user had 50 different letters that he wanted to send out, I'd have to create a "Letter layout" for each letter, I think. That's un-acceptable.

                      Here's what I want to do:
                      If you look at the letter table which is actually a database table, I want the user to be able to select the "current focused record" and copy it to a common table - this is also working. I then want to use that copied record in place of a "Letter Layout" , possibly a report layout, so when I click on "Print Letters", it prints all marked records using the copied record.

                      Hope this is clear to you all now.

                      Thanks again,
                      Rudy

                      Comment


                        #12
                        Re: Fetch Current Record

                        Rudy, maybe the Runtime Plus version is what they need. With it they can design their own report or letter layouts. Would take a bit of training I suppose but nothing more complex than learning how to do a mail merge in word processing.

                        Comment


                          #13
                          Re: Fetch Current Record

                          Hey Tom,

                          Hows everything. I spent at least 5 hours last night trying to figure this out. If I were to create a 3rd table that contained the data needed from both tables and somehow scripted a merge or append of the 2 tables into the 3rd table, I could produce a report layout using the 3rd table and print the letters that way. Does this seem possible to you?

                          I wish there was some way I could link the letter record with each tagged record and use that set however there is no common field to do that.

                          Rudy

                          Comment


                            #14
                            Re: Fetch Current Record

                            something else to consider it that if your client has 2 or more users doing this on a network at the same time, each letter will go to ALL marked records - i.e., from those marked by both users.
                            Cole Custom Programming - Terrell, Texas
                            972 524 8714
                            [email protected]

                            ____________________
                            "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

                            Comment


                              #15
                              Re: Fetch Current Record

                              Hey Martin,

                              Good thought. There are only 3 users on the network. Security will be set up where only 1 person will be allowed to perform this function along with the Association President (backup). I'll state in my User Guide (Procedure Section)that only 1 user at a time can produce letters.

                              Thanks,
                              Rudy

                              Comment

                              Working...
                              X