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

Serious bug with posting rule

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

    Serious bug with posting rule

    I found a serious bug with the posting rule that can be easily reproduced in the Invoice sample application that was shipped with Alpha 5.

    In this sample application, the item quantity is supposed to be posted to the inventory database with the PRODUCT_ID as the matching key between the INVOICE_ITEMS and PRODUCT databases. This works flawless until the user changes the PRODUCT_ID in the invoice while editing a previously saved record. Alpha 5 fails to update the new and old inventory record to reflect the change in the item's PRODUCT_ID.

    For example, I create an invoice with an item code of P003 and quantity of 2. I then edit the invoice, and change the item code from P003 to P004. When I save the changes, I expect that quantity 2 is added back to the P003 inventory, and quantity 2 is subtracted from the P004 inventory. This does not happen, and I am left with an inconsistent inventory database.

    I am using version 4.5 build 266.

    Does anyone have a workaround for this problem?

    Thanks.

    #2
    RE: Serious bug with posting rule

    Xichi,

    I'm not sure I'd call this a 'bug', but there are three solutions which occur to me:

    1) Prohibit edits in your data entry routine. Require user to enter a new record to reverse the original one. This would restore the correct item count for the affected entries. It would also create an audit trail so you could see when the change to the order occurred.

    2) If figuring out how to create the reversing entry is too difficult for your people, make it easy for them to delete an incorrect entry, and then activate the 'undo on delete' feature of the post field rule. When they delete the incorrect entry the item count will be adjusted. They can then start over.

    3) Create your own custom posting routine using an Xbasic script which runs whenever the user changes the value in the product id number field. Such a script would have at least two different pieces: one to capture the current value before edits begin, and one to adjust the item counts once the edits are finished.

    -- tom

    Comment


      #3
      RE: Serious bug with posting rule

      Thanks for the detailed suggestions.

      It is a serious bug in my application, and maybe a "feature request" for Alpha 5. The posting rule should be re-run whenever the user edits fields that affect the linking key. I seem to recall that this was not a problem in Alpha 4, or version 4.0.

      I think I will try suggestion 3).

      Comment


        #4
        RE: Serious bug with posting rule

        I would have to call this a bug because one would expect the corrections to be made as happened in Alpha Four.

        The one that that should be checked is to see if this same thing happens with A5 V4.0/4.5 in an application other than A5's sample invoicing application.

        Mike
        Thank you,
        Mike Konoff

        Comment


          #5
          RE: Serious bug with posting rule

          Another way of avoiding this would be to have a script or user process that would zero the posted values, then change the linking value, and reenter the correct posted values. This would not be too difficult ascript to write and it would keep the posted values correct.

          For an A5v3 database I wrote custom posting rules to handle a situation which was beyond regular posting. This checked for changes in critical fields and made the needed modifications automatically to two records during the OnSave Event trigger in the field rules. The Xbasic code took care of everything by just being installed in this one location.

          Dave

          Comment


            #6
            RE: Serious bug with posting rule

            If you set "undo on delete" in the posting rule, then all you need to do is to mark item P003 as Deleted and enter item P004. All is done for you.

            How would the posting rule know what to do when you changed the key?? I could probably write some elaborate script to acomplish what you want to do, but why circumvent the rule when the solution is fairly simple? Someone entered a bad line item. Just delete it, and enter the correct one.

            Tom

            Comment


              #7
              RE: Serious bug with posting rule

              Tom,

              I agree. In fact, that's one of the 3 suggestions I listed, above. -- tom

              Comment


                #8
                RE: Serious bug with posting rule


                Mike,

                To me a 'bug' is the failure of the program to do what the manuals say it will do. The description of the post field rule does not assert that changes made after a record has been entered will be re-evaluated and appropriate adjustments made for you automatically. If it did, and it failed to do so, I'd agree. Otherwise, I think you are mislabeling an unsupported functionality. I would not argue that the limitations of the post field rule could be spelled out better in the docs, and I think that's a good idea, by the way. -- tom

                Comment


                  #9
                  RE: Serious bug with posting rule

                  Sorry to duplicate.

                  Tom

                  Comment


                    #10
                    RE: Serious bug with posting rule

                    Mike,

                    I was curious about Alpha Four's handling of this issue, so I dug out my Vers. 6 manuals for Alpha Four.

                    Nothing in the docs indicates that the post data field rule in Alpha Four would solve the original problem in this thread.

                    Undo on delete works the same way in Alpha Four and Alpha Five.

                    If the item remains the same but the quantities are edited, the net difference between new and old quantities are posted. This works the same way in Alpha Four and Alpha Five.

                    However, I see nothing in the docs for Alpha Four that leads me to believe that if I change the actual item number itself, the post data field rule will automatically adjust the original item's inventory record before going ahead and posting the new item's transaction to inventory.

                    This is a long winded way of saying that I think maybe Alpha Five is behaving like Alpha Four in this regard.

                    -- tom

                    Comment


                      #11
                      RE: Serious bug with posting rule

                      Tom,

                      Have a look at page 10-19 in your Alpha Four version 6 Reference Manual in the section "HOW THE POST DATA FIELD RULE WORKS"

                      I quote the 2nd paragraph...

                      "When you change an existing value in a field that has a Post Data field rule, Alpha Four posts the difference between the original value in the field and the new value in the field."

                      There is an example 2 paragraphs later that shows the posting in A4 works as I assumed it to.

                      Have a look-see.

                      Mike
                      Thank you,
                      Mike Konoff

                      Comment


                        #12
                        RE: Serious bug with posting rule

                        One question...if this is the case with A4 and A5 has a similiar "post" feature in its' field rules, why doesn't/wouldn't A5 work in the same way with regard to posting???

                        I'm not saying it doesn't work in the same way. I even suggested that this should be tested in another circumstance just to be sure it's not some snafu with respect to the A5 invoicing app...something I have yet to do.

                        Mike
                        Thank you,
                        Mike Konoff

                        Comment


                          #13
                          RE: Serious bug with posting rule

                          Tom,

                          I must correct myself.

                          I breezed through the original post so quickly that I mis-interpretted the problem thinking it was not adjusting the quantity posted to the re-adjusted value. Instead, he was changing the item number and was assuming there would be an unposting on the orignal item number and re-post to the corrected item number.

                          Big DUH for me!!!

                          Sorry...my apologies to you!!!
                          Mike
                          Thank you,
                          Mike Konoff

                          Comment


                            #14
                            RE: Serious bug with posting rule


                            I did. The paragraph you refer to is exactly what I'm talking about.

                            Transaction 1 - Item ABCD 300 units.

                            The post rule could be used to subtract 300 units from
                            the inventory table.


                            Edit Transaction 1 - Same Item ABCD, but now 400 units.

                            The post rule would subtract an additional 100 units from
                            the inventory table.


                            These examples are what are supported according to the docs.

                            This thread complains about a different situation.

                            Transaction 2 - Item CDEFG 200 units

                            The post rule could be used to subtract 200 units from the inventory table.

                            If the user then edits Transaction 2,
                            and changes it to Item ABCDEF 200 units,

                            the docs do not claim that Alpha Four or Alpha Five will add back 200 units to inventory table for Item CDEFG.

                            I don't think the post rule has ever permitted this.

                            If you have a working example I'd be interested in seeing it.

                            -- tom

                            Comment


                              #15
                              RE: Serious bug with posting rule

                              No apologies needed. It's very easy to misconstrue or mis-read these posts. -- tom

                              Comment

                              Working...
                              X