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

Change or enter error

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

    Change or enter error

    I have posted this problem before and received several suggestions on correcting it, but none seemed to work.

    I have attached a file with form and files needed to reproduce the error.

    If someone would care to look at it and see if they can find the problem I would appreicate the help.

    I know I have missed something but don't know what.
    TIA

    Lloyd

    #2
    RE: Change or enter error

    Lloyd, clearing the onDepart script from the Customer_ID field did not solve the problem. I think the trouble lies in the OnSave script for the form itself. I had good luck with the following version, which I've commented to show the changes from your original.

    Hope this helps.

    -- tom


    'OnSave script for Payment Entry Form
    ' As script begins record has just been saved

    'Form is based on set. Tables in the set are open.
    ' But no data entry is pending (was just saved)


    DIM ax_choice as C
    DIM ax_response as N
    DIM ax_dialog as P


    ON ERROR GOTO ax_error_trap
    DIM ax_error_trap_desc as C
    DIM ax_error_trap_offset as C
    DIM ax_error_trap_msg as C
    DIM ax_error_trap_response as N

    ax_error_trap_desc = "Action Script"
    ax_error_trap_offset = "0"
    ax_error_trap_desc = "Inline Xbasic"
    ax_error_trap_offset = "1"
    dim t as p
    dim tbl as p
    dim pmt as n
    t=table.current() 'points to parent table in set

    'tbl=table.open("billing table") 'wrong. Table is already open.
    'If you open it again, Alpha Five will give
    'it a different alias...
    'so, point to it like this...
    tbl=table.current(3) 'billing table is in 3rd outline slot in the set

    tbl.index_primary_put("customer_id")
    tbl.fetch_find(t.customer_id)
    tbl.change_begin()

    pmt=t.total_paid-t.sp_assess
    if tbl.ninety_day>0 .and. pmt-tbl.ninety_day>=0 then
    pmt=pmt-tbl.ninety_day
    tbl.ninety_day=0
    elseif tbl.ninety_day>0 then
    tbl.ninety_day=tbl.ninety_day-pmt
    pmt=0
    elseif tbl.ninety_day0 .and. pmt-tbl.sixty_day>=0 then
    pmt=pmt-tbl.sixty_day
    tbl.sixty_day=0
    elseif tbl.sixty_day>0 then
    tbl.sixty_day=tbl.sixty_day-pmt
    pmt=0
    elseif tbl.sixty_day0 .and. pmt-tbl.thirty_day>=0 then
    pmt=pmt-tbl.thirty_day
    tbl.thirty_day=0
    elseif tbl.thirty_day>0 then
    tbl.thirty_day=tbl.thirty_day-pmt
    pmt=0
    elseif tbl.thirty_day

    Comment


      #3
      RE: Change or enter error

      Tom

      Thanks for the help.
      It seems to work except I need to stay in the form for continous enter. The form.close() takes me out of the form instead of going to a new blank form. Is there a way around this.

      Lloyd

      Comment


        #4
        RE: Change or enter error

        Lloyd,

        Put a "'" before the parent_close.form(). This will cause the line not to be read and you can see how that works.

        kenn
        TYVM :) kenn

        Knowing what you can achieve will not become reality until you imagine and explore.

        Comment


          #5
          RE: Change or enter error

          Lloyd, after the save do you want the form to show the record just saved, or do you want it to automatically begin a new record with fields blanked out on the form? Will make a difference.

          I closed the form because you began the new record in an onInit event for the form. This fires only one time, when the form is first initialized... Usually when folks start the new record in this fashion it means they only want the user to work on one record at a time... closing the form between each... Otherwise, the next new record doesn't start automatically.

          Do you want a new record to start automatically after the last one is saved?

          -- tom

          Comment


            #6
            RE: Change or enter error

            If continuous entry of new records is what you want, change the last part of the OnSave event for your form to:

            'tbl.close() 'wrong. Cannot close it since form is based on it.
            'parentform.close() 'so, close form instead. This closes the set.
            parentform:Tables:Payments.enter_begin(HONOR_FIELD_RULES) 'begin new record
            parentform.resynch() 'resynch form
            sys_send_keys("{Tab}") 'move focus to customer_id field

            END

            Comment


              #7
              RE: Change or enter error

              Tom

              I do want continuous entry. I played around with the origional scripts and it seems that if I comment out the line "payments->complex_code=left(payments->customer_id,i-1)" ,which is attached to the customer_id fields OnDepart event then the original scripts work the way I think they should. When the comment is removed then the errors occur whem leaving the last field. That is why I thought the problem was with the script on the ondepart event.

              Lloyd

              Comment


                #8
                RE: Change or enter error

                Did you check to see whether the billing history table was properly updated...

                It looked to me as though the onSave script was quietly failing... giving you the impression that it was working correctly. I saw nothing wrong with the onDepart script for customer_id.

                try changing the script as shown in my previous post, to do continuous entry.

                -- tom

                Comment

                Working...
                X