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

Routine to filter dates, Help Please.

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

    Routine to filter dates, Help Please.

    My customer wants to write to his customers that he has done work before, but not to write to them if he has done work for them since a variable date.

    eg. Work was done for Mrs Smith in 2009 and 2010, therefore, if the variable date is 31/12/2009 Mrs Smith will NOT be included in the list of customers to be written to.

    My question is, what is the best method required to capture the required data to print from?
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

    #2
    Re: Routine to filter dates, Help Please.

    Keith, there's probably a more efficient method, but you could "mark" or "tag" customer records that should NOT get a letter (i.e. those for whom work has been done recently), and then send the letter to customers who haven't been marked or tagged.

    This problem comes up now and then. You need a list of records where something you are tracking has NOT happened. It's hard to build a list of what you can't see, so to speak. Annual membership renewals are another good example. Members renew. Renewals are tracked. Non-renewals are not recorded. Now give me a list of members who didn't renew.

    Comment


      #3
      Re: Routine to filter dates, Help Please.

      Hi Tom,

      Thanks for getting back to me on this.

      This seems an interesting suggestion to mark unwanted records, which might be better than my idea of creating a temp table and not using records if the Customer_Id is in both tables.

      Your comments are appreciated.
      Regards
      Keith Hubert
      Alpha Guild Member
      London.
      KHDB Management Systems
      Skype = keith.hubert


      For your day-to-day Needs, you Need an Alpha Database!

      Comment


        #4
        Re: Routine to filter dates, Help Please.

        Hi Keith,

        Wouldn't you want to register which customers have received a letter so that you avoid sending more than one letter?

        I would focus on the customers that meet this variable date rather than marking the ones that don't.

        As for Tom's example, isn't it true that once you have a renewal date for customers that it's rather simple to select the ones that haven't renewed?

        Regards,
        Jo Hulsen
        Dommel Valley Solutions
        The Netherlands

        Comment


          #5
          Re: Routine to filter dates, Help Please.

          I guess I'd get 2 lists of customers. First list is ALL CUSTOMERS. Second list is customers with work done from starting date tp present, and then subtract the second list from the ALL list to get the list of customers to petition.
          Mike W
          __________________________
          "I rebel in at least small things to express to the world that I have not completely surrendered"

          Comment


            #6
            Re: Routine to filter dates, Help Please.

            Hi Mike,

            Thanks for your suggestion.

            then subtract the second list from the ALL list to get the list of customers to petition
            What process should I use to accomplish that task?
            Regards
            Keith Hubert
            Alpha Guild Member
            London.
            KHDB Management Systems
            Skype = keith.hubert


            For your day-to-day Needs, you Need an Alpha Database!

            Comment


              #7
              Re: Routine to filter dates, Help Please.

              Jo, thanks for your comments. I suppose whether its easy to list non-renewing members or not depends on the particulars of each application. In the case I had in mind the organization tracked the receipt of dues payments. Since multiple types of dues might be owed by any particular member the organization did not record the expiry date for any particular dues payment. They did not track renewal dates. Only the receipt of dues payments. Building a list of members who did not pay dues is how they sent out "renewal notices". So you see the problem. Since they tracked only the receipt of dues payments, they didn't have an easy way to build a list of non-payers. I thought this was similar to Keith's scenario. Is it not? I assume keith's client does not track, in the customer record, the date of the last job or sale. I think that's a valid assumption since if that information were available in the customer record he wouldn't be asking the question in the first place, right?

              Comment


                #8
                Re: Routine to filter dates, Help Please.

                Tom,
                Thanks for your extensive explanation.
                I'm beginning to see the issue as you described....

                Reading through Keith's post however, I have to assume that job dates are recorded and that there is a relation between a customer table and a job/order table. So he can cycle through the customer table and check for work done. If yes, check if all jobs for that customer have a date older than 01/01/2010. If yes, than that customer should receive a letter.

                Regards,
                Jo Hulsen
                Dommel Valley Solutions
                The Netherlands

                Comment


                  #9
                  Re: Routine to filter dates, Help Please.

                  So many questions along this line and for some reason the easy solution never seem to come up at first!

                  All you need is a summary operation and a query on the summary table.

                  Need further elaboration?

                  Comment


                    #10
                    Re: Routine to filter dates, Help Please.

                    Given that the previous question seems rhetorical, I might as well answer it now. Here you go:
                    Just go to the Letter tab and print the letter "test".
                    Last edited by G Gabriel; 05-15-2010, 05:52 PM.

                    Comment


                      #11
                      Re: Routine to filter dates, Help Please.

                      Gabe,

                      Thanks for you input.

                      What you have failed to appreciate is that the dates are in the child table of Jobs, with parent table as the Customer. ie. A Customer can have many Jobs over a period of time.

                      The object of the exercise is not to write to the customer if they have had work done after an input date.
                      Regards
                      Keith Hubert
                      Alpha Guild Member
                      London.
                      KHDB Management Systems
                      Skype = keith.hubert


                      For your day-to-day Needs, you Need an Alpha Database!

                      Comment


                        #12
                        Re: Routine to filter dates, Help Please.

                        G, thanks. That's very helpful. I forgot that the Summary Operation can do more than total. Here, your example, uses a summary operation to find the "Max" work date value... i.e. the most recent work date. This is dumped to a new table which can be used to do the report or letter with a simple filter excluding the more recent work dates customers. Very nice.

                        -- tom

                        Comment


                          #13
                          Re: Routine to filter dates, Help Please.

                          Originally posted by Keith Hubert View Post
                          ie. A Customer can have many Jobs over a period of time.
                          I figured that already, but how would I have known about the child table? When there was no mention of such? In fact there was no mention of multiple dates per customers, I assumed that to be the case and hence the reason of the difficulty.
                          Regardless, the same idea applies.
                          1-Summarize the child as I did
                          2-Have a set with the parent 1:1 sum_child
                          3-Print the letter based on that set.
                          Same vernacular.

                          Comment


                            #14
                            Re: Routine to filter dates, Help Please.

                            More mud to put into the water maybe.
                            I have used the Summary method, the two table method using a Subtract operation, and also creating two lists which then uses the word_subtract() function. All a matter of what someone is most comfortable with as they all work.
                            Mike
                            __________________________________________
                            It is only when we forget all our learning that we begin to know.
                            It's not what you look at that matters, it's what you see.
                            Henry David Thoreau
                            __________________________________________



                            Comment


                              #15
                              Re: Routine to filter dates, Help Please.

                              2 tables method?
                              with subtract operation?
                              2 lists?
                              with word_subtract?

                              Sorry, but this sounds to me like a two-headed monster that doesn't know which way to look, much less which way to go!

                              Sorry. No such a thing will work here.

                              What will work though is an array (or a list) in a UDF picking up the record with the most recent date for each customer, i.e. home-made summarize operation as opposed to alpha's built-in.
                              Which is better?
                              Test both and report.

                              No, don't think of dbmax() or anything similar unless you want to spend a lot of time at the beach. I personally like the home-made one and was going to write a UDF but didn't want to spend the time, specially when you never hear a word of thanks from Jordon Brown.

                              Comment

                              Working...
                              X