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

Christmas Holiday

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

    Christmas Holiday

    I know how to set the Christmas Date in Settings, the question was asked before but I cant find the answer, does this have to changed manually each year?

    Supplementary question, I have a number of establishments that each will have it's own closing dates, this would be in a child table, how does this table get used in conjunction with the "a_holidays.dbf"?
    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: Christmas Holiday

    Originally posted by Keith Hubert View Post
    I know how to set the Christmas Date in Settings, the question was asked before but I cant find the answer, does this have to changed manually each year?
    Yes it needs to be changed manually. It may be possible to write a function in Alpha to get the information from elsewhere..

    Code:
    Supplementary question, I have a number of establishments that each will have it's own closing dates, this would be in a child table, how does this table get used in conjunction with the "a_holidays.dbf"?
    I do not see any point in storing such records in a different table. Alpha only looks at the specified "holiday_table" when using the add_bus_days() and bus_days_between() functions.

    Comment


      #3
      Re: Christmas Holiday

      Hi Gary,

      Thanks for getting back to me on this.

      The reason for using separate tables is because you cant use a filter in BUS_DAYS_BETWEEN(), so my line of thinking is that each establishment would have it's own list of holidays, unles you know how to filter the BUS_DAYS_BETWEEN().

      Using this code as a sample, how do I use a variable for the table name?
      Code:
      dim tbl as P
      tbl = table.open("customer")
      tbl.enter_begin(.T.)
          tbl.Date= var->date
          tbl.enter_end(.T.)
      tbl.close()
      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: Christmas Holiday

        Hi Garry

        Originally posted by Garry Flanigan View Post
        I do not see any point in storing such records in a different table. Alpha only looks at the specified "holiday_table" when using the add_bus_days() and bus_days_between() functions.
        The function can look at alternate tables which are declared in the function and in the case of having different establishments which have different holidays an extra field could be added to your own table to filter the holiday dates accordingly. However I am not sure if the functions will accept the table filter?

        Kind regards
        Glen Schild



        My Blog

        Comment


          #5
          Re: Christmas Holiday

          Originally posted by Keith Hubert View Post
          Hi Gary,

          Thanks for getting back to me on this.

          I know that I shall have to write to separate tables with dates for holidays.

          Using this code as a sample, how do I use a variable for the table name?
          Code:
          dim tbl as P
          tbl = table.open("customer")
          tbl.enter_begin(.T.)
              tbl.Date= var->date
              tbl.enter_end(.T.)
          tbl.close()
          Code:
          dim tbl as P
          dim vtblname as C
          tblname = "whatever you want to put here"
          tbl.table.open(vtblname)
          Glen Schild



          My Blog

          Comment


            #6
            Re: Christmas Holiday

            Glenn beat me to it but there was one small typo in his code snippet

            dim tbl as P
            dim vtblname as C
            vtblname = "whatever you want to put here"
            tbl.table.open(vtblname)

            Bob
            Bob Whitaker

            Comment


              #7
              Re: Christmas Holiday

              Originally posted by Bob Whitaker View Post
              Glenn beat me to it but there was one small typo in his code snippet

              dim tbl as P
              dim vtblname as C
              vtblname = "whatever you want to put here"
              tbl.table.open(vtblname)

              Bob
              doh! Fingers not keeping up with brain!
              Glen Schild



              My Blog

              Comment


                #8
                Re: Christmas Holiday

                Glen,
                I agree that Alpha can use more than one holiday table but I guess do not see a practical application. Different establishments normally means different applications. No doubt there will be an example somewhere that requires more than one table though...

                Comment


                  #9
                  Re: Christmas Holiday

                  Originally posted by Garry Flanigan View Post
                  Glen,
                  I agree that Alpha can use more than one holiday table but I guess do not see a practical application. Different establishments normally means different applications. No doubt there will be an example somewhere that requires more than one table though...
                  First of all the a-holidays.dbf table resides in the program exe folder and unless I have missed something not sure you can write to it without using the setting menu option (as I said I may be wrong on this!)

                  I am aware of Keith's requirements and I will leave him to explain :) but different establishments managed by one organisation is the nature of this beast!

                  Cheers

                  Glen
                  Glen Schild



                  My Blog

                  Comment


                    #10
                    Re: Christmas Holiday

                    I believe using the following example you can use xbasic to change most/all settings....

                    http://support.alphasoftware.com/alp...r_settings.htm
                    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


                      #11
                      Re: Christmas Holiday

                      I am not really sure what is the question, but you can add as many holidays as you want. Birthdays, anniversaries, G. Gabriel Holiday, or memorial..

                      Comment


                        #12
                        Re: Christmas Holiday

                        Hi Gabe,

                        The issue is not the nature of the holiday but filtering the holiday table when using the bus_days_between() function.

                        Each building in the application will shut down on different days for maintainance, so I need to know who works in which building and how much to pay them, as they don't get paid when the building is closed.

                        If you know a way to filter the Holiday table which also takes into account non working days, please let me know.
                        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


                          #13
                          Re: Christmas Holiday

                          OK.. I see but still somewhat not quite clear on what you are trying to do.
                          As I said earlier, you can add whatever and however many holidays you want. What I don't understand is:
                          Are you trying to tailor each to each end user on the network?
                          So if Building A where user A is shuts down every 12/31 while Building B where user B is shuts down every 3/31 but yet both User A & User B are connected to the same db? i.e. adding those dates to the holiday table will not work for both users?

                          Comment


                            #14
                            Re: Christmas Holiday

                            Hi Gabe,

                            You have almost got a grasp of what I'm trying to do.

                            You seem to be confirming that I cant put all the holidays into one table. I could, but the problem seem to be when I want to extract the data out again. That is why I'm thinking of using different tables for the holidays of each building.
                            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


                              #15
                              Re: Christmas Holiday

                              I get the idea.
                              bus_days_between() won't work for you as it does not take a filter.
                              You could do, either:
                              1-Leave the holiday table alone. Add a field (if the building shuts down one day a year). Then use bus_days_between() and subtract the holiday applicable to the building
                              2-Assuming there is > 1 day per year, you will need to add separate table showing the dates for each building, then subtract the applicable date from bus_days_between()
                              3-In any case, your best bet is a UDF to do the above.

                              bus_days_between() is a butcher knife not a surgeon's scalpel. Either you add the holidays, all of them, or you don't. You don't get to pick and choose which holidays and the table is rather very primitive, only has 2 fields: date & name.

                              That said, this should open your eyes to a better possibility:
                              Why not overwrite the holiday table with a custom table with more fields? The new table will have another field, say building. Then you could write a more sophisticated bus_days_between() function that takes into account which building. In fact, if your business grows internationally, you could take into account which country.

                              Don't tell me you want me to do that now! I am too busy right now, but if you feel brave enough where you want to override your holiday table (really does need a lot of bravery because you could always revert back to the original table), I will do it.. but not now. Sorry, way to busy.

                              Comment

                              Working...
                              X