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

Opinion Needed On Design

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

    Opinion Needed On Design

    I'm in the midst of programming a CMMS, by myself and never done it before, and I am in need of some insight. I'm learning new ways to operate Alpha 5v7 everyday but I am still far away from knowing enough to solve design problems. The business I work for needed a computerized maintenance management software that handles every day work.

    Stock/Special Purchases by the Parts Department.
    Equipment Maintenance Schedules.
    Daily Work Orders including Easy/Medium/Estimated Jobs.
    There's a lot more involved, but just this small scope is a lot to deal with for me. I guess I'm just sharing this stuff because I'm hoping maybe someone can help in my quest.

    Is it reliable to link two tables using an expression involved two fields? It seems obvious any new record on the child table will need the two field values implanted to complete the link. I am using this for my Part Inventory aspect of the program.

    It goes like this, All parts have an inventory number (non symbolic, and sequential). This Inventory number is used to link an equivalent part but with either a different Part_No or different Vendor.

    Inv No 1:M Part_Id/Vendor (Inv_NO to Inv_NO)
    Part_ID/Vendor 1:M Purchases (Part_Id/Vendor to Part_ID/Vendor)
    I did this so that purchases for the same Part_Id from two different vendors would show the purchases separately. This also handles equivalent parts but with different Part_ID's all grouped under the same Inv_NO. So Inventory number can actually handle any number of part_ids.

    My question is: Is this a suitable way to handle more than one part ID for the same exact part, and also split the vendor purchases for the same Part_ID?
    A lot of this I have dreamt up because of various needs vs my lack of knowledge. Can anyone elaborate?

    #2
    Re: Opinion Needed On Design

    My Purchase table is linked with two fields to the Part table. The Part Table has to have Part_ID and Vendor_ID to make it link. So adding new records that link between Purchases and Parts involves Xbasic creating new records for a purchase and implanting proper values to the Part_ID and Vendor_ID fields. Along the way, any edit made to either the Part_ID or Vendor_Id then automatically loses connection with the purchase records. Unless using Xbasic I ensure all fields are changed and relinked back together, in the simplest terms. What is called when you must follow every link to add/edit/delete any type of information, especially when it's across sets different sets? All these things need to be planned out I suppose and I don't have enough skills yet. The actual Sets are linked in such a way that either you have a concrete link , or an expression of fields and values, or you can just leave information inside of one table. These are the things that occur to me and it gets pretty overwhelming..what's the best medication to help you program clearly...hahah

    Dan

    Comment


      #3
      Re: Opinion Needed On Design

      Daniel,

      You cannot be changing the contents of linking fields. If you have a field where you think you might change the contents anytime, do not use it as a linking field. People connect tables everyday with two fields instead of one( I never have and do not intend to). I found it easier to have a field in the master table that connected to other table(s) and the user does not get to mess with this one.

      I have not been able to follow your reasoning so far. I will read it a few more times and maybe it will make better sense. The first rule in making a program is to know what you need to accomplish in the end, then work somewhat backward. Put it on paper and figure out how it can work.

      My inventory is not pulled out until the sale is final, it gets marked as pending maybe.

      It seems you are trying to make a work order and it come out as a estimate or final or maybe. You have an inventory table that you want to deduct products from when sold? You want to track where the parts came from and re-order?

      Maintnance is a whole different ball game, but can have a link if part of your inventory has to do with maintenance.

      Dave
      Dave Mason
      [email protected]
      Skype is dave.mason46

      Comment


        #4
        Re: Opinion Needed On Design

        Maintenance is the name of the game...check out other systems like Cybermetrics "Faciliworks" which has a free demo, or "ProView" which recently was bought out by Cybermetrics. These were the founding programs my company started with. Its basically just what you said: A system to create work orders, which are basically a report of Parts used and Tasks used. It's all pretty simple when you think about it, the complications come when ideas are transformed into code.

        I am using a unique Part Inventory system that I though of after deciding what was needed in the end didn't result from a One to One or One to Many Link. My problem also is that I cannot express my thoughts clearly at first, I must assume subconsciously that you all have the same viewpoint as me. Ooops #1. :)

        If you think about it like this it might help.

        A Master Inventory Number (sequential) is used to relate any number of Parts that are equal is all aspects. So one Inv_NO can have say 20 parts linked to the INV_NO. The 20 Parts themselves are Objects themselves and represent the "Actual" part with has an ID. You see, our Vendors (e.x. Steel Manufacturers, Snap-On, Lighting Companies, and such sell their products with a unique Part_ID that they own. Other companies also make the same exact part but with their own Part_ID. So in order to group all similar parts together I created the Inventory Number to group them. My situation then becomes when I log in purchases (mainly for cost and stock count numbers) I have to link the purchases back to the individual Part_ID. The method I chose is to have each Part_Id link to it's own purchases by using the Part_Id and the Vendor who sells that ParT_ID.

        To sum it up, Inventory Numbers groups Part_ID's together if they are equivalent, and each Part_ID owns a Vendor_ID. The Part_ID + Vendor_ID combination are the link the the purchase table. So whenever there is a purchase for PartA from VendorA the purchase table itself has to be made absolutely sure that the link information is put into their respective fields. Otherwise there won't be a link.

        It's not really a problem at this point, all purchases are linking back to their respective Parts and all Inventory Numbers are showing their children parts as well. I just have a gut feeling that something somewhere is going to throw me off. At this point I make Functions(showing XDialogs) for handling the Adding of Parts and the Adding of Purchases. So far I've had luck.

        But are there any red flags popping up about how I am linking and moving information around in my program?

        Its getting tricky to keep all the records together, if let's say one of the Vendor_ID's changes because I mistyped something or what to change it. Now I have to change the Name across all of my tables in order for the links to be reestablished. Whooosh. Lots of stuff...

        It's been fun working with Alpha 5 so far, and I've learned so much. My company is counting on me completing this project soon and I've only been able to make the Part System work correctly after creating and destroying at least 2 other versions of the system. Hmm....is it common?

        Thanks dude,
        Dan

        Comment


          #5
          Re: Opinion Needed On Design

          Hi Daniel,

          I am also working on a CMMS. I do not yet have a module for purchase orders because in my particular situation it isn't necessary yet but will include one eventually.

          My method of handling different supplier part numbers for one part is that I have a join table between the Parts table and the Supplier table. The Parts table holds info on the part as used locally (ie by you) and includes a part_id field which is auto-increment and internal to my application. The info in the Part table is limited to only describing the part. The Supplier table holds info on the Supplier (clever eh). It has a Supp_id field again only for internal application use as a key field.

          The act of aquireing a part from a supplier has its own set of info and therefore its own table(Part_Supp). This is where I store the part number. I also store the price here as it also varies from supplier to supplier. Any info you may want to keep regarding the act of purchasing the part from this particular supplier would go in this table. This table has fields for Part_Id, Supp_Id, PartNUm, Price etc. The table also has an PartSupp_Id field which is an autoincrement field used only as a key field for this table. It has no meaning as far as the data goes.
          I then use a set with Part table as parent linked one to many to Part_Supp which is linked one to one with Supplier.

          I am not sure how this may help you in linking to purchase orders but thought I would share it in case it might give you an idea. And I will keep thinking about it as well as I want to include this eventually myself. One initial thought is to use the PartSupp_Id field in the purchase order.
          Tim Kiebert
          Eagle Creek Citrus
          A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

          Comment


            #6
            Re: Opinion Needed On Design

            Inv_ID describes the part in general.
            Inv_ID has #Stocklevel #ReOrdering(min/max) #Any other Key fields

            Inv_ID links 1:M to Part_ID using Inv_ID as Key.
            Part_ID describes actual Part and Specifics (e.g. #MFG #Model #Vendor)
            Part_ID links 1:M to Purchase_ID using exp(Part_ID + Vendor_ID) for the purchase link
            Purchase_ID describe any purchase including the P.O., Date, Units of Measure, etc.
            Purchase_ID is good for reporting. Use the Inv_No in to show the complete purchase or stock of Inv_ID

            Inventory Level: Inv_ID (Inventory Number)
            Parts Level: Inv_ID + P_ID + V_ID
            Purchase Level: Inv_ID + P_ID + V_ID

            Seems pretty cool I think, but that's because it's the best I've done...:)
            Now that you mention it, using a sequential number as a link for the P_ID + V_ID problem would make enormous sense. LOL

            Comment


              #7
              Re: Opinion Needed On Design

              I don't trust using forms completely when it comes to entering records and ensure proper information. I've been XDialog'ing most transactions on tables. Is this preferable? I've been writing functions to work with records being displayed on the main form, but having them occur from Dialogs and Button Presses. I find myself asking whether it's more efficient to work with tables directly outside of the form, or to work with what's being displayed on screen. If that makes any sense that would be nice.

              Is it good to manipulate records with Xbasic over using built-in operations and field rules?

              Thank you so much for responding

              Comment


                #8
                Re: Opinion Needed On Design

                Originally posted by warmexxus View Post
                I don't trust using forms completely when it comes to entering records and ensure proper information.
                I use forms more or less exclusively for data entry. They work. However, I generally use dialogs (as verses xdialog) for data entry. I make the underlying form modal to prevent data entry, usually w. an embedded browse to allow viewing records.

                Originally posted by warmexxus View Post
                I've been XDialog'ing most transactions on tables. Is this preferable?
                If you like xdialog, I think that is a preferable method in that it lets xbasic address the live data, not the user.

                Originally posted by warmexxus View Post
                I find myself asking whether it's more efficient to work with tables directly outside of the form, or to work with what's being displayed on screen.
                Addressing tables is better than letting the user "touch" the data, in my view.

                Originally posted by warmexxus View Post
                Is it good to manipulate records with Xbasic over using built-in operations and field rules?
                Again, this is preferable in my view.
                Peter
                AlphaBase Solutions, LLC

                [email protected]
                https://www.alphabasesolutions.com


                Comment


                  #9
                  Re: Opinion Needed On Design

                  That makes me feel a lot better because I thought that I just liked doing things the hard way. :) I would rather dictate what the user can do with records, and to ensure nothing unexpected occurs, than work completely with field rules and form rules...

                  Thanks Petah

                  Comment


                    #10
                    Re: Opinion Needed On Design

                    The other aspect of my program deals with Dated events. I have an idea but it just doesn't seem right. I will use a Master Table that simply records dates (perhaps every day that my program is run) and this Master Table will be the basis of a set. The Children in the set, (linked by Date) to the Master Table would filter everything in my program to a date. The areas affected by this Master Table, would be available records such as "Work Orders", Dated events such as Maintenance Scheduling, and anything else that happens on a Day to Day schedule. So if I used this Master table which stores "Program Run Dates" and match that with things such as Dated Work or Dated Events...does it sound like something that would work or it too simple and I got it all wrong? What I'm looking for is a program that manages day to day work, totals, comparisons, and record keeping. This new idea just dawned on me so if you have any suggestions I would be so appreciative...thanks

                    Dan

                    Comment


                      #11
                      Re: Opinion Needed On Design

                      I do almost everything in forms including data entry/edit. I still have some field rules to help a bit. I have had no problem with data to this point. I DO trust the forms and my code written for use in those forms.

                      When programming in VB, Clipper, etc., we made variables for all fields we wanted on a form and wrote the code to update or enter those in the table as needed. This system created as many problems as it solved, but was workable. This can still be done on a form today in alpha. I see no reason to change what I am doing to this point and go to variables. May change my methods later?.?.

                      Dave
                      Dave Mason
                      [email protected]
                      Skype is dave.mason46

                      Comment

                      Working...
                      X