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

Disappearing field data

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

    Disappearing field data

    I am experiencing a strange behavior with a database I am designing. I have used this design before with another database application without problems, so I am not sure if the problem is related to my understanding of A5 or is an actual bug.

    At the simplest level, I have a set with one parent and two child tables (CHILD A and CHILD B). The parent table has a one to one relationship with each child. Each child uses the same key from the parent table.

    The parent table contains a unique encounter ID and a date. Each child table contains specific data regarding the encounter. Both child tables have working field lookup tables as the source of most of the field data. The remaining record fields are free form text fields.

    A modal form, based on the the set has multiple fields. Some are from the parent, some CHILD A, and others CHILD B.

    A new record is fetched from the form. Data is entered in multiple lookup fields from CHILD A. No problem. Data is entered in multiple lookup fields from CHILD B. Again no problem.

    Now the unexpected part. Upon leaving the field from CHILD B, if focus is now put on a field from CHILD A, whatever the first field in CHILD A that had data entered in it loses it's data. The remaining fields are fine.

    If focus is now put back on a field in CHILD B the same thing happens. The first field entered loses its data.

    I do notice that when going from CHILD B fields back to CHILD A fields a change record event is indicated on the form status bar. I have tried multiple things including disabling the field after leaving it, cancelling the change record event, changing the referential integrity settings, changing the parent/child relationship. None of these prevent the problem.

    The only thing that does prevent the problem is if the first field entered for each child is a free form text field. In this case going back to CHILD A fields then CHILD B fields does not cause the loss of data in the free text fields. The problem only occurs if the first field entered is a lookup table field. It could be any lookup field on the form, but if it is the first entered then it will happen.

    Any help would be appreciated.

    Barry Oppenheim

    #2
    Re: Disappearing field data

    Try setting the order of your browse so that it uses an index and not record number

    Using record number in browse can cause unpredictable behaviour
    It does not help that this is the default sort method
    Mike Thomson

    Comment


      #3
      Re: Disappearing field data

      Originally posted by Mike Thomson View Post
      Try setting the order of your browse so that it uses an index and not record number

      Using record number in browse can cause unpredictable behaviour
      It does not help that this is the default sort method
      Mike,

      Thanks for the suggestion. The records are already indexed on the unique id and not the record number.

      Barry

      Comment


        #4
        Re: Disappearing field data

        You are entering the child then the parent. You should enter a new record for the parent, save it, then enter a child.

        Comment


          #5
          Re: Disappearing field data

          Originally posted by G Gabriel View Post
          You are entering the child then the parent. You should enter a new record for the parent, save it, then enter a child.
          Gabriel,

          Thanks for the input. Actually, the parent data gets entered automatically (the unique id and date are calculated fields). All I am doing is switching between the two child fields.

          With that said I did try saving the record after each field entry using the ChangeField event. That seems to be a fix. Still, I don't think I should have to program saving the record for each change.

          I also tried switching my lookup fields from a pop up to a drop down type. When I do this the problem goes away. In another words I don't have to save the record with each field event change.

          So now the question is why do lookup tables with pop up boxes trigger this behavior, but not lookups with drop down boxes?

          If push comes to shove I can work with drop down or use the commit() in the ChangeField event. But I would rather not.

          Barry

          Comment


            #6
            Re: Disappearing field data

            Barry:
            You don't have to save the record after each change. What I was saying, when you enter a new record, you need to save the parent before entering a child that way the value for the linking field is established and the link to the child is established.

            Comment


              #7
              Re: Disappearing field data

              Gabriel,

              I realize that you were just referring to the parent record. I tried that, but it did not solve the problem. Only when saving the record after each field change does the problem not occur.

              As for establishing the parent record, even without saving, the linking field (which is only calculated in the parent record) shows up properly in both child tables. So I don't think that is the problem.

              But in either case it still doesn't explain why this only occurs with pop-up lookup fields and not drop down look up fields. Is there a difference in the events/event order of these two I am missing. Guess I'll run a trace again and see how they differ, if at all.

              Barry

              Comment


                #8
                One more try?

                OK. I have included a simple data set to illustrate the problem. Still without an answer.

                Thanks in advance,
                Barry

                Comment


                  #9
                  Re: Disappearing field data

                  Barry:
                  followed your instructions. You are jumping from Child1 to child2 before saving child1, then going back to child1 and back again to child2.

                  I am not sure I understand your logic behind that!

                  Comment


                    #10
                    Re: Disappearing field data

                    If I understand correctly (I haven't looked at the sample dataset), all the data is being entered on the SAME form. If this is the case then it shouldn't matter what fields from the set are being used to hold the input data. Idoco should not have to "save" anything until he/she is finished with data entry. You should be able to enter data into ANY FIELD in the set. The only thing that needs to happen is that the linking field for the child tables is the correct size and data type as the linking field in the parent table.

                    Comment


                      #11
                      Re: Disappearing field data

                      The fact that I am jumping from child 1 to 2 should not make a difference if the form is based on the same set. If the field types are not lookup, but rather text fields the behavior does not happen. If the fields are lookup (based on the same lookup tables), but dropdown (not pop up) the behavior does not happen.

                      Looking at the trace, the field events appear to be the same regardless of the lookup type. Again, the question is why do pop up, lookup tables only cause this problem?

                      Gabriel. I appreciate your input. In this application it is necessary to jump between child tables because the acquisition of data is not linear. In other words, the data be captured may come in order (field 1, field 2, etc) or may come out of order (field 13, field 5, field 6 etc). Since the data is being entered as it is acquired the form has to have the flexibility of entering the fields in the record in any order.

                      Barry

                      Comment


                        #12
                        Re: Disappearing field data

                        Barry:
                        why do pop up, lookup tables only cause this problem?
                        This question about the popup lookup came up on this forum many times in one way or another.

                        While I am not prevy to the internal work of alpha, I cannot offer you a definite answer but it appears that when you are using a popup lookup, you are looking at the value in the external table, the one you are using for lookup, if you move to a different field without saving, that value has not been added to your table yet. You could call this a bug in the lookup table, perhaps it is, but that's how they behave. If you choose to use popup lookup you need to be aware of that. I found lookup previous to be much better in every aspect.

                        Comment


                          #13
                          Re: Disappearing field data

                          Barry...

                          I agree with you that it should make no difference how you move through the fields to gather your data. As long as it's on the form then you should not have trouble capturing the data.

                          Gabriel...

                          This has got to be a bug. Regardless of whether it's a pop-up or drop-down, the data source is the same. If Barry pops-up a lookup table and selects a value, he should not have to save that value before moving to the next field. What would happen if his user decided to cancel the operation? If, as you say, he must perform a save then he would now have to create a method to "undo" his "saves". That would be utterly ridiculous and a complete defeat of a relational database system.

                          Barry - report this as a bug. If a pop-up is supposed to act this way then the powers-that-be should alert you to that fact so you can design your application to accomodate this action.

                          Comment


                            #14
                            Re: Disappearing field data

                            Regardless of whether it's a pop-up or drop-down
                            This does not happen with drop down. If it's a bug, which I believe it is, it's one that dates back a long time and it's only with popup.

                            The fact that it has not been fixed in such a long time leads me to believe it's not an easy fix since the folks at alpha are pretty good in fixing these bugs promptly. So, if you choose to use popup lookup, which I personally dislike, then you need to be aware of that.

                            You should report it as a bug, but I don't have high hopes that it will be fixed soon. Many such report have been made already. Who knows, it might get fixed this time around.

                            Comment


                              #15
                              Re: Disappearing field data

                              Barry:
                              The problem with the popup can be corrected by setting the field rules of the lookup field to popup on entrance. If you noticed it was always a problem with the first field in the child table not holding the data - definately a bug. Activating popup on entrance allows the field to hold the assigned value.

                              Comment

                              Working...
                              X