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

  • Rudy16
    replied
    Re: Fetch Current Record

    Wrong Help File. Here's the latest one.

    Leave a comment:


  • Rudy16
    replied
    Re: Fetch Current Record

    I finally got it. I'd like to thank everyone who took the time to try and help me with this issue. I found myself overwhelmed at first with all the various suggestions so I took a breath of fresh air and decided to take a break.

    I abolished the "Common Letter" concept and came up with the following based on some of your suggestions and and some thought on my own. . They say a picture is worth a 1000 words so I'll attach a few screen shots including a Help File that explains how I approached the issue.

    Works like a charm. While I spent many many hours hashing this around, it took less than 2 hours to design, code and test it out. It's like I saw the light.:D

    Thanks again to all, especially to Tom & Mr. G. who really sparked my thought process.

    Rudy

    Leave a comment:


  • G Gabriel
    replied
    Re: Fetch Current Record

    If the substance of the letter or any part of it has to change based on certain conditions, that does not mean you have to create a separate letter for each condition.
    There are many ways to use the same letter with varying texts, for example:
    use Conditional objects
    Use if..else..end if statments
    not to mention few other esoteric options.

    Leave a comment:


  • Tom Cone Jr
    replied
    Re: Fetch Current Record

    Rudy P asked:
    I would like to replace 1 line in the below script. Instead of hard coding the tbl.blocname "Late Dues" as the report pointer, can you use the textblockname from the the child table (tbl.txtblocs)?
    I had to go back and read the article. "Textblockname" is the name of a field in the child table containing blocks of text. Field values in "Textblockname" uniquely identify each record using descriptive text, such as "Late payment", "Payment Reminder", "Overdue", "Pay up or else", and so on. You could have a form that displayed the child table records in a browse. The form would be based on the child table alone. The records could be displayed in an embedded browse. The user could then edit the text in any record. So, if they wanted to change the text in a "Late payment" letter they'd choose that record from the browser and edit the memo field containing the text. A button could be put on the form that ran a script which:
    a) grabbed the "Textblockname" field value for the currently selected row in the browser and store it in a variable;
    b) opened the resident's contact information table; and stuff that variable's value into the blocname field for each resident you wanted to send the report to; naturally you'd have to run a query first unless you wanted to send the report to all residents; and
    c) finally, the same button script could run the report filtered on the same field value.

    Leave a comment:


  • G Gabriel
    replied
    Re: Fetch Current Record

    Currently, there is no link between the letters table and resident table.Therefore, I cannot merge the data from both tables into the report.
    Yes Rudy.. I suppose my understanding was correct.
    The above "issue" or "problem" is of your own creation. You are trying to resolve the "issue" that there is no connection between these two tables. While this could be resolved, yet it will take you deeper and deeper in a defective design.

    Instead of putting L1 in a table and trying to connect L1 to R1 and R2, you create a letter layout based on the Resident's table, to "merge" you simply add fields from the Resident table to the letter layout then you use as a filter Marked() and when you marK R1 and R2, it will print the letter for these 2 residents only, the ones you marked.

    Leave a comment:


  • Rudy16
    replied
    Re: Fetch Current Record

    Patience is a virtue and many of you have it.

    1) I have a table that holds residents
    2) I have another table that holds different letters
    3) I select letters from the letters list table
    4) I "Mark" the residents to which the letter applies.
    5) I set up a Report Layout that I want to merge data from the resident table and letter table into (Common Report is a better description.)

    Example:
    I have 3 letters in the letters table. Letter-1, Letter-2, Letter-3
    I have 6 residents in the resident table. R1, R2, R3, R4, R5, R6
    I have 1 Report Layout.

    I have a form that has the letter records on the left and an embeded browse of residents on the right.
    I select the letter on the left that I want to use.
    I Mark the residents in the embedded browse that I want to print the letter to.

    When I select Letter-2 and Mark R1 and R2 and press the Print Letter button:
    I expect Letter-2 to print out for R1 and R2.

    Issues:
    Currently, there is no link between the letters table and resident table. Therefore, I cannot merge the data from both tables into the report.

    Tom Kone Jr. has a paper accomplishing this by adding a lettername field to both tables with the resident table lettername field initially blank. He has a script that "forces" a "Specific" name into the resident table lettername which creates the link and now the resident data is available to merge into the report.

    I need to modify the script to not to force a specific name but to use the lettername from the letters table. Not sure if you can do that.

    Is this a little clearer?

    Rudy

    Leave a comment:


  • G Gabriel
    replied
    Re: Fetch Current Record

    Let me see if I could make this simple enough. Here is my understanding:
    1-You have a "Common Letter". I am not sure where this letter is saved: whether in a table or a letter layout.
    2-You have a table that lists residents
    3-You have another table (or perhaps the same table) tha lists different letters
    4-You select a letter from the letters list
    5-You select "tag" the residents to which this letter applies
    6-You want:
    a-To merge the resident's information in the selected letter
    b-merge the selected letter with the "Common Letter"
    Right?
    If the answer is yes, then again, you do not need a separate letter layout for each resident.

    Leave a comment:


  • G Gabriel
    replied
    Re: Fetch Current Record

    Again, I do not want to have to create a letter layout for every letter that is created.
    I am not sure why you think you have to have a separate layout for every letter? Maybe I am still confused, but I could assure you by the time this thread is over one way or the other you will find out that is not the case.

    Perhaps you might consider sub-reports in your report.

    Leave a comment:


  • Rudy16
    replied
    Re: Fetch Current Record

    Mr. G.

    There is not an issue with using the letter layout. I did that with no problem.
    Again, I do not want to have to create a letter layout for every letter that is created.

    The issue is having multiple letters and 1 common report layout to print any of them.

    Thanks,
    Rudy

    Leave a comment:


  • G Gabriel
    replied
    Re: Fetch Current Record

    Rudy:
    I think you are trying to re-invent the wheel. Like Selwyn, when I first read your original post I found myself "straining" trying to understand what you are after and because of my lack of patience, didn't try too hard and dropped it.

    You are trying to "Customize" letters but instead of taking advantage of the "Letter" layout provided by alpha, you are doing so in a form. Nothing wrong with that except it's confusing the heck out of everyone, myself included.

    You say:
    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.
    It is un-acceptable but it is also un-true, so don't think it.

    Just design a Letter layout that says the same stuff you have in that form:
    "You have not paid your dues,...etc"
    In the records tab of the Letter layout, use as a filter: marked() then print. It will print one letter for each record you "tagged".

    By the way, "Tag" is the Frenh word for "Mark". In your vocabulary try to use Mark instead of tag that way you would remember that there are functions that deal with mark, unmark etc.

    And yes, you could "merge" anything in the letter layout. To do so, insert fields from the table in the letter.
    Last edited by G Gabriel; 06-28-2008, 08:55 AM.

    Leave a comment:


  • Rudy16
    replied
    Re: Fetch Current Record

    Tom,
    I would like to replace 1 line in the below script. Instead of hard coding the tbl.blocname "Late Dues" as the report pointer, can you use the textblockname from the the child table (tbl.txtblocs)?

    ' To print report to all records in Names table:
    tbl = table.open("Names.dbf") 'point to parent of set
    tbl.batch_begin()
    tbl.fetch_first()
    while .not. tbl.fetch_eof() 'stuff block name in each record
    tbl.change_begin()
    tbl.blocname = "Late Dues"
    tbl.change_end(.t.)
    tbl.fetch_next()
    end while
    tbl.batch_end()
    tbl.close()

    :report.preview("testltr2")

    Leave a comment:


  • Tom Cone Jr
    replied
    Re: Fetch Current Record

    I could produce a report layout using the 3rd table and print the letters that way. Does this seem possible to you?
    I am skeptical that this will prove feasible. Alpha's layouts (reports and letters) are not meant to be stored in tables. They are more properly thought of as templates than "records".

    Depending upon the skill / experience level of your users another option (besides purchasing the runtime plus version) could be:

    a) produce the letters in your favorite word processor using its mail merge capabilities;

    b) using a mail-merge data source created by exporting the desired records from Alpha.

    The advantage of this for users (without runtime plus) is that they can easily change the text of the letter template (mail-merge form), while being assured that they are using current data from Alpha. i.e. instead of maintaining a separate mail-merge data file in the word processor they simply create one each time, using Alpha as the data source.

    A different approach was outlined (a long long time ago) in an article I wrote for www.learn alpha.com called something like "User Modifiable Reports". Perhaps it will give you some ideas.

    --------------------------------------
    Concerning the possibility of multiple users marking records simultaneously that's a real issue. I'm glad it's been mentioned. A better approach is to filter the resident records by some specific criteria they have in common already. "Marking" should be your last alternative, used only when it's not possible to query the table and get the desired records.
    -------------------------------------

    -- tom

    Leave a comment:


  • Rudy16
    replied
    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

    Leave a comment:


  • martinwcole
    replied
    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.

    Leave a comment:


  • Rudy16
    replied
    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

    Leave a comment:

Working...
X