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

Problem with embedded browse

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

    Problem with embedded browse

    I'm not sure yet how to explain the problem. I think if I could explain the problem better I may be able to figure out what needs fixing. But alas, I am spending my days and nights trying to run my business and haven't really learned what I need to know about programming in Alpha Five. I was hoping I could just click and place and it would work. Okay, here goes my attempt at explaining what I need help with.

    Up until yesterday I had a working embedded browse on my main Customer Management form. This browse would show me a list of all "Units" owned by the Customer when I clicked on the Units tab. This form is based on a set that starts with my Customer table and links several other tables that hold information about several aspects of what I track for each customer. I have a Request table to log customer requests, a Transaction table to log monies received on Invoices or Contracts, and a Units table to hold records for each separate appliance owned/purchased by this customer, including where it is installed, it's serial number, etc.

    BTW, this database was started before I had version 9. I now am using it with Version 11. Version 9 has been removed. All my edits are being done in Version 11.

    My form consists of a main information area that holds the customer number, name, contact info, etc. Under this main area I have placed a tabbed sub-form with a tab for each of the linked tables. One tab holds fields for the Customer Account info, one for the Requests, one for the Units, and one for the Transactions. By clicking on each tab of the subform I can quickly see all records associated with this one customer and each table is linked to the Customer table with a CustomerID field.

    Yesterday I tried getting fancy and added another embedded browse to the requests tab, under the main requests browse, that would show me the linked Units for each request when I clicked on the specific Request record in the requests browse. I couldn't get it to work at first so I figured out that if I edited the set to include a link from the Request table to the Units table I could get the correct unit to show up. Great! It now works.

    Unfortunately, now when I click on the seperate Units tab to look at the Units browse I now have a bad browse. The broswe now shows me a continuously repeating list of the same Unit number. It used to show me a list of all the Units owned by this customer. Now I only get one record repeated down the browse, filling the browse from top to bottom.

    I tried removing the browse and redoing it. I tried creating a named browse and then linking to it. Nothing is working.

    I have a feeling it has something to do with the set definitions. But I really don't know. It could be completely unrelated.

    Is it okay to add more than one link to the same table in a set definition? The first link is from Customers to Units, as a One-to-many. I also linked the Units table to the Request table so I could see the model number when I clicked on a request in my request browse. So now I have the Units table linked twice in different branches of the set diagram and one of the links is named with an alias of "Units1" and the other is "Units".

    I'll try to lay out my set diagram here:

    Code:
    Customers
    |===Requests
              |===Request_Dtl
                        |___Units1
    |===Transactions
    |===Units
    What have I done? Did my change to the set diagram break my browse of the Units records associated with each Customer?

    Is there a way to copy this database/workspace and remove all the personal data at the same time? If so, I could send a copy of my database so you all could take a look at what I've done. If not, I'll try to explain the best I can.

    Thanks,
    Sean

    #2
    Re: Problem with embedded browse

    Okay, I may have confirmed that the problem comes from adding the second link to the same table in the set diagram. I went ahead and deleted the new link I had created previously and now the Units tab browse is back to normal.

    I guess I don't really understand why I can't get the fields I want in the embedded browse on the other tab, the Requests browse.

    For each Request record I can have multiple linked Units. I used a linking table I named Request_Dtl. Each record in this linking table holds the Request number and the associated Unit number. This works to have a Many-to-Many relationship between the Request table and the Units table. What I was trying to do was show all the associated Units for each Request as I clicked on each Request in the Request browse on my tabbed sub-form on my Customer Management form. I tried to add an embedded browse to show the Units linked to the Request through this Request_Dtl table. Unfortunately I caused a problem with the more important Units browse on the other tab (the Units tab) on my sub-form.

    Here's my current set diagram after removing the second link to the units table (Units1):

    Code:
    Customers
    |===Requests
              |===Request_Dtl
    |===Transactions
    |===Units
    I think I have to totally redo my sets and forms. But for now I was hoping to be able to add a couple of features to my existing format. I am thinking I may not spend much more time on this and instead start figuring out how to do all of this record keeping using the web side.

    Thanks for the help.

    Sean

    Comment


      #3
      Re: Problem with embedded browse

      Sean,
      I guess I don't really understand why I can't get the fields I want in the embedded browse on the other tab, the Requests browse.
      Is the Browse and the field you want to insert same table?

      Comment


        #4
        Re: Problem with embedded browse

        No, and I guess that is the problem. The field I want to see is in the Units table and browse is on the Request_dtl table. My set does not have a link to the Units table through the Requst_dtl table. When I attempted to create such a link I broke the other browse that was based on the same Units table but linked through the Customers table. I guess I can't link the same table more than once in a set design.

        Maybe I can do what I want using the programming language? I've always just used the menus and ActionScript to get the results I want. This time I think I stretched too far. I'll just put it back the way it was.

        Thanks

        Comment


          #5
          Re: Problem with embedded browse

          Sean,

          My set does not have a link to the Units table through the Requst_dtl table.
          You can use the Lookup(x) or UDF to call the field values from other tables without link(set).

          I've always just used the menus and ActionScript to get..
          I still do but You have to know how to use the xBasic in order to get full option. You may not able to make something what you need without xBasic.

          Comment


            #6
            Re: Problem with embedded browse

            I guess I can't link the same table more than once in a set design.
            Yes, you can link more than once and the field and source of table name(alias) are required your attention when you apply it.

            Most of experience guys are recommended that make the small size set, 2 or 3 max if it is possible.
            If you need 10 tables link together, do not make one huge set. Breakdown to small size.

            Comment


              #7
              Re: Problem with embedded browse

              Thanks John,

              Yes, I have read that before. Problem is I don't know what tools to use to link tables together without using this 10 table set design. Still got lots to learn.

              Can you give me a tip on how to use a lookup to do what I am trying to do with a set link?

              Sean

              Comment


                #8
                Re: Problem with embedded browse

                Sean,

                I have enclosed some of the Screenshots. I only show the lookup function and did not mention about UDF or using the variable method at all. I hope it give you the general conception(?) of how to get the fields from other than linked tables.

                (1) Other tip: make a Study Db and actual your project DB. Before you make a application, practice from your Study DB. It will help you will not mess your project DB

                (2) You can use the Lookup() function on Table level, set level, forms or else.
                (a) When you write it on the Table or Set level, you can find it at Report's dropDown lists.
                (b) When you use it on form level, you can see it only current form. You can copy and paste it to other forms.

                Tutor_1.jpgTutor_2.jpgTutor_3.jpgTutor_4.jpgTutor_5.jpg

                Comment


                  #9
                  Re: Problem with embedded browse

                  Thank you John. I will study this. Right now I'm too busy to program. I'll come back when I can.

                  Sean

                  Comment


                    #10
                    Re: Problem with embedded browse

                    Using DBF's try this function instead and search the external table:

                    Code:
                    dim SHARED vc_LookUpValue as C ' shared/available anywhere on the form.
                    vc_LookUpValue = lookupc("C","FindThisValue","ReturnThisFieldValue","FromThisTable","UsingThisIndex") ' First Parm "C" for closest mach
                    vc_LookUpValue=alltrim(vc_LookupValue)
                    Asuming you're trying to look-up a value in table B, using a field value in table A (to embed the lookup value in a browse using a calculated field): The FindThisFieldValue parameter can be written like this:

                    "TableA->FieldName".....

                    Code:
                    [B]cc_LookUpValue = alltrim(lookupc("C",TableA->FieldName,"ReturnThisFieldValue","FromThisTable","UsingThisIndex"))[/B]
                    
                    
                    
                    'NOTES:
                    'Note1:  cc_LookUpValue the cc+ designates a "calculated character" field. (it's the way I differentiate calculated fields from other variables
                    ' (I turned it into a "one liner" above, so it may be used as a "calculated field" on a browse.  ~  Alltrim is necessary to remove spaces.)
                    
                    'Note2: It's also a good idea to keep index names to a max of 8.  I take the field name, remove all vowels, and add 2 underscores at the end.
                    '  Example:  CustomerID field index would be named "Cstmrd__"  (It's easy to glance at and know it's my designated index instead of
                    'an alpha generated one.  Also, the 2 underscores indicate it hasn't been truncated.  (a5 bug can cause unexpected index truncation)
                    
                    'Note3:  Same goes for table field names:  Keep them to a maximum of 10.
                    Lookupc() is faster as it uses an index. (which must be pre-defined on the table)
                    It doesn't matter where the table is, or whether it is joined/part of your layout's set... Give it the parameters, it will return the value.
                    Last edited by SNusa; 04-03-2013, 03:54 PM.
                    Robert T. ~ "I enjoy manipulating data... just not my data."
                    It's all about the "framework." (I suppose an "a5-induced" hard drive crash is now in order?)
                    RELOADED: My current posting activity here merely represents a "Momentary Lapse Of Reason."

                    Comment

                    Working...
                    X