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 to use an array

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

    #16
    Re: how to use an array

    I'll have a go at this.

    Previously I was thinking of having a second table called stock_date each record would have stock_id, date_collect and date_return fields.

    If I used a lookup filter similar to what I using presently to get my logical field booked set to true would this do away with the need for an entry for each day.?
    This is assuming that I can get the lookup to filter on values from an unrelated table!
    Failure makes improvements

    Comment


      #17
      Re: how to use an array

      Originally posted by John Keogh View Post
      I'll have a go at this.

      Previously I was thinking of having a second table called stock_date each record would have stock_id, date_collect and date_return fields.

      If I used a lookup filter similar to what I using presently to get my logical field booked set to true would this do away with the need for an entry for each day.?
      This is assuming that I can get the lookup to filter on values from an unrelated table!
      I have to admit I am thinking something akin to tuxedo rentals here. Showing a particular item as booked would prevent you from booking it again for a future time when its current status is still booked. That is why this needs to be tested elsewhere so that your items table is merely the lookup to provide the detail for the item. Can you zip up an example for us to play with?
      Robin

      Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

      Comment


        #18
        Re: how to use an array

        Tuxedo rentals is exactly what I do but in Scotland its kilts, highland jackets and all the accessories that go along with it.

        Clothing, tools, cars or hotel rooms they all have a start date and an end date in between these two dates they are unavailable to anyone else, only the booked user can have them allocated to them.

        John
        Failure makes improvements

        Comment


          #19
          Re: how to use an array

          Away from work now will see if I have a backup at home and zip it other wise it will be tomorrow.

          Thanks to all for all the input. I feel I am getting close to a solution now.

          John
          Failure makes improvements

          Comment


            #20
            Re: how to use an array

            Here is a zip of my app. Loads of live data on it.

            Its a few months old now things have moved on a bit but the principal parts are still the same.

            John
            Failure makes improvements

            Comment


              #21
              Re: how to use an array

              Here is a zip of my app. Loads of live data on it.

              Its a few months old now things have moved on a bit but the principal parts are still the same.

              John
              Failure makes improvements

              Comment


                #22
                Re: how to use an array

                Hi,

                May I ask, how many tables has this database got? Because I am just failing to see why you need to use this logical field at all - wouldn't it make more sense to have a table for bookings that contains the item code/id, who booked it, a start & end date and whatever else you need to log.*

                Then when you query whether item X is free on date Y, you search for entries in the bookings table that match the item ID and where start_date >= querydate .and. end_date <= querydate... If a matching record is found, the item can't be booked for the selected date, if no matches are found, and the item is in stock (see below - being due back isn't the same as BEING back, so you may want to display a warning to say the item is currently overdue for return and may not be available), then it can be booked for the date(s) you selected.

                * It would make sense to set a field to true or false to denote current stock status, this is updated when an item is actually handed out or received back - this also allows you to compare actual stock vs. what is due in, e.g. it lets you determine overdue items etc.

                Comment


                  #23
                  Re: how to use an array

                  Hello

                  There are several tables being used but the main part uses personal_details and two stock tables kilt_stock and jacket_stock.

                  Some of the tables in the zip are redundant now. To decrease query time I have split some of the accessory stock tables into several small tables. These tables have no date function part they are simple postings to reduce stock levels by one for every true record between date_of_collection and date_of_return.

                  The personal_details table has both date fields, stock code fields and all the other info that I need to record.

                  I think I understand the reason for this unique field that would be indexed but I need in my lookup to exclude all booked stock so I can see at a glance what is available rather than going through stock codes still I find one that is available.

                  This assumes I understand what is being suggested

                  Thanks for the input

                  John
                  Failure makes improvements

                  Comment


                    #24
                    Re: how to use an array

                    Hi John,

                    I can see why you were asking about an array.

                    What I think you need, as Tom, Robin and Andrea have suggested, is a single table for the lookup ( it would have other benefits for reporting) that would be as if it were a set with the Item and booked dates as the child linked 1:1

                    So when you do your lookup it would be for Item_Id .AND. Start date of required hire that is .NOT. between Hire date and return date. This would take into account future bookings. As you cant do a look up to a Set it seems to me you will need two look ups one to see if the item is available and the second to book it for hire. When you do the hire a small routine will be needed to append the new data to the booked items lookup table.

                    Past hiring could be appended to a history table and then deleted to keep the lookup table small and current.

                    I hope my two pence worth gives an extra thought.
                    Last edited by Keith Hubert; 05-22-2008, 06:01 AM.
                    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


                      #25
                      Re: how to use an array

                      Thanks for your thoughts Keith

                      I had not thought on two lookups.

                      I'll give it a go.

                      Right now I'm trying to use exist(), keyexist() and keyunique() to solve my problem.

                      Do you know if a filtered lookup can be achieved using a filter on an unrelated table i.e.

                      If my filter was to exclude record that are true in a booked_stock table while looking up my stock table

                      Regards

                      John
                      Failure makes improvements

                      Comment


                        #26
                        Re: how to use an array

                        Hello all

                        Just to update you all on my progress

                        I almost have it cracked. I can now do my lookups on two machines.

                        I duplicated my stock table called stock_two and set my lookup to conditional on the name of the pc

                        Therefore pc1 looksup stock_one pc2 looksup stock_two.

                        I now have a conditional post again on the pc name which posts to the appropriate stock table setting my logical field to true

                        Thus my filter to show only .f. records means I see only stock available.

                        I am refining it so as if the two machines dates overlap they will then post to the others stock table as well.

                        Its maybe a long winded method but it appears to work.

                        John
                        Failure makes improvements

                        Comment


                          #27
                          Re: how to use an array

                          Hi John,
                          You have an interesting project for sure. I have been looking at your tables this past week and seeing if I could normalize them. And now I have a question about the stock qty field for your stock items. I can see where socks and such would be just one item with a quantity on hand field (I assume these are not returned but sold instead?). But each jacket, kilt and other accessories for instance, would need to be a separate item would it not - since these are returned? So some items would only be separate items for size and/ or color with a QOH field (like scrunchies).

                          So for socks, you would need one item per color and size; and if these are sold then the type of inventory they are needs to be different since these items must be replenished thru new purchases. If this is not true for socks, is it true for any of the other items you carry? It seems obvious that if some item is not returned that was supposed to, then it would get "sold" too and must be removed from inventory or repurchased.

                          You mentioned Quickbooks in another post. Have you looked at how they handle inventory and non-inventory items?

                          It would no doubt help if I knew what sporrans, skeans, flashes and scrunchies actually were! ;) I did look online but most times it was assumed the person looking to hire such things knew what they were already.
                          Last edited by MoGrace; 05-29-2008, 01:05 PM.
                          Robin

                          Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

                          Comment

                          Working...
                          X