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

forms and record pointers

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

    forms and record pointers

    I need to enter a variable, find the record and display it on the form. Sounds simple but I just can't get the results. The attached database illustrates the problem. I have 3 order entry screens. Order entry (1) comes close to what I need. The database consists of records 43100 through 43200.
    1. open the order entry screen
    2. enter quote # 43125
    The browse below points to a different quote #. Move to any other quote number on the browse, reposition to the quote # on the above form, enter 43125 or 43142 or any other number and it operates as desired. Only on the first time does it get stuck on the browse record. Also many times on reposition to the top of the screen the field labels do not reappear. (they reappear if a click is made anywhere on the screen)
    3. Also on the new record button the browse changes it's record pointer, thr form updates to the browse record, but it should be blank for a new record entry.

    Next:
    on Order entry 3, which is the desired form, the browse is removed (added to help me understand where the pointer is) but when 43165 or 43125 or any other quote number is entered, the pointer does not seem to find the record. But on closing the form, NO to save enter in progress, the record appears, just before the screen closes.

    Desired results are:
    1. Enter quote #
    2. If exists, display
    3. If non-existant, allow entry.
    4. On new record button, clear form and go to #1

    I did come across documentation, Alpha 5 xbasic reference manual page 166, stating the form record pointer is different from the record pointer (what is that about?) but is resynched with resynch(), but this does not seem to work.

    I hope I am being clear, but I am weary of this whole dilemma. The "order entry 3" is what I desire (the browse is not necessary).

    Any help before I need to contact Support$ ?

    #2
    RE: forms and record pointers

    Geoff,

    I have had a look at your app and I think I can see where you are going off track. If I were doing this project ( I am working on one very similar at the moment), I would have seperate forms for Quotaions and Order Entry. I feel that you are trying to put too much onto one form which can lead to user brain overload.

    I suggest Form 1 Quote. Set to open for Enter New Record (as you would on a sheet of paper).

    Form 2 Order Entry. This is using the same data as Form 1. What is the perpouse of this form. What are you going to change? Will you add new child items? Who will get to see the data. I assume you will send a Quotaion to your client, what will you send to whom after the Order Entry?

    If the object of Order Entry is just to view data then the form must be designed to be used that way. The varable for the Order Number will be used as a Search field. Here is the script for the Find Button.

    SELECT
    CASE Search_By.value = "Last_name"
    topparent.index_set("Name")
    topparent.find(search_for.value)
    CASE Search_By.value = "Company"
    topparent.index_set("Company")
    topparent.find(search_for.value)
    END SELECT

    'clear the value in search_for
    search_for = ""
    search_for.refresh()

    Having the form designed this way you can find any order for any customer or find an order by number. I have just used my form as a guide.

    If you need more help just holla.


    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


      #3
      RE: forms and record pointers

      Thanks Keith for your suggestions, but I need and want to mimick an existing app. (The former app works perfectly as far as entering the quote, finding, editing or creating new (if not found) records. Unfortunately the former app is a DOS app.) The problem seems to be solely with the record pointers and form. Finding and displaying records should not be a problem.
      I only need one order entry screen. "order entry 2" is the same as "order entry" with the exception of the browse activate() and refresh(). "Order entry 1" and "order entry 3" demonstrate the difference using browse vs no browse.
      "Order Entry 3" (with no browse) is the desired result, but "Order Entry" (with browse) is the closest to results needed (browse added to help track record movement).

      Comment


        #4
        RE: forms and record pointers

        Geoff,

        I'm glad you posted a working model of the database. Would never have gotten to the bottom of it otherwise.

        Here's what's causing the trouble in OrderForm3. The OnDepart event of the variable object is trying to move the record pointer in the current primary table of your set. However, as soon as you begin entering the desired M_QUOTE value you place the form in CHANGE mode. Alpha Five won't move the record pointer while in CHANGE mode.

        Try this revised version of your OnDepart script to see if it gets you closer to what you need:

        "pre"
        parentform.commit()
        result = parentform.mode_get()
        if result "" "VIEW" then
        ui_msg_box("Oops","Not in View mode")
        end
        end if
        t=table.current()
        old_idx = t.index_primary_get()
        't.order("dynquote")
        t.index_primary_put("dynquote")
        frec=t.fetch_find(var-"m_quote)
        if frec " 0 then
        t.index_primary_put(old_idx)
        ui_msg_box("Record not found","quote ="+ m_quote)
        topparent.new_record()
        newdyn-"dynquote=m_quote
        topparent.commit()
        topparent.resynch()
        end if

        if frec " 0 then
        ' topparent.resynch()
        t.index_primary_put(old_idx)
        parentform.resynch()

        end if

        'topparent.resynch()
        'browse5.activate()
        'browse5.refresh()

        "/pre"

        If you use this I suggest you change the OnArrive event script to test the mode of the form, and prompt user to cancel or save pending changes before you let them run this revised OnDepart script. -- tom

        Comment


          #5
          RE: forms and record pointers

          Geoff,

          I'm glad you posted a working model of the database. Would never have gotten to the bottom of it otherwise.

          Here's what's causing the trouble in OrderForm3. The OnDepart event of the variable object is trying to move the record pointer in the current primary table of your set. However, as soon as you begin entering the desired M_QUOTE value you place the form in CHANGE mode. Alpha Five won't move the record pointer while in CHANGE mode.

          Try this revised version of your OnDepart script to see if it gets you closer to what you need:

          Code:
          parentform.commit()
          result = parentform.mode_get()
          if result  "VIEW" then
             ui_msg_box("Oops","Not in View mode")
             end
          end if
          t=table.current()
          old_idx = t.index_primary_get()
          't.order("dynquote")
          t.index_primary_put("dynquote")
          frec=t.fetch_find(var->m_quote)
          if frec 
             t.index_primary_put(old_idx)	
             ui_msg_box("Record not found","quote ="+ m_quote)
             topparent.new_record()
             newdyn->dynquote=m_quote
             topparent.commit()
             topparent.resynch()
          end if
          
          if frec > 0 then
          '   topparent.resynch()
              t.index_primary_put(old_idx)
          	parentform.resynch()
          	
          end if  
          
          'topparent.resynch()
          'browse5.activate()
          'browse5.refresh()
          If you use this I suggest you change the OnArrive event script to test the mode of the form, and prompt user to cancel or save pending changes before you let them run this revised OnDepart script. -- tom

          Comment


            #6
            RE: forms and record pointers

            Thanks! Tom.
            Tried it real quick and it appears to be just what I needed. Will test further and let you know if I have any problems.
            Now problem 2. The form I am using scrolls from the form on top to a browse on the bottom. When I move to the browse and scroll back to the top using the scroll bar, the top fields appear, but the labels do not. The labels reappear if I click anywhere on the screen but not if I enter a field. How can I refresh the labels when the scroll bar is used?

            Comment


              #7
              RE: forms and record pointers

              Geoff,

              I don't know the answer to that one.

              Suggest you re-post the second question in a new thread. It will get better visibility there, and will help other traveller's searching for information on that issue later on.

              -- tom

              Comment

              Working...
              X