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

need advise/opinioin - Child records in gorups

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

    need advise/opinioin - Child records in gorups

    Hello everyone,

    I would like to display on a form child records in groups.
    Imagine situation where you browsing (for example) invoices. Every invoice has some items included in it (like in AlphaSports).
    I would like to see that items separated by price for example - items below $10 in one group, below $100 in other and so on....
    The perfect solution for me would be possibility to add filter on a one-to-many embedded browse on the form so only specified records are shown (and i will create as many browses with different filters as i need). Unfortunately I could not figured out how to do it or if it is possible at all -using just embedded browses.

    Could anyone please push me in proper direction - should I try to use embedded Xdialog, or maybe HTML Form supercontrol ( I like the new accordion panels), or maybe there is some other simpler solution?

    Any idea will be very appreciated!

    #2
    Re: need advise/opinioin - Child records in gorups

    The easiest way is to create a 1:M set with multiple links to the child table. In the set definition filter each copy of the child however you want. I imagine you could also do it in xdialog.
    Peter
    AlphaBase Solutions, LLC

    [email protected]
    https://www.alphabasesolutions.com


    Comment


      #3
      Re: need advise/opinioin - Child records in gorups

      Peter,
      I tried your suggestion and I could not get the set created because the attempt to filter the same table in two different ways at the same time isn't allowed. Did you get this to work?
      Last edited by Mike Wilson; 11-26-2008, 03:03 PM. Reason: add example
      Mike W
      __________________________
      "I rebel in at least small things to express to the world that I have not completely surrendered"

      Comment


        #4
        Re: need advise/opinioin - Child records in gorups

        Originally posted by Mike Wilson View Post
        Peter,
        I tried your suggestion and I could not get the set created because the attempt to filter the same table in two different ways at the same time isn't allowed. Did you get this to work?
        Mike,

        See attached sample...
        Peter
        AlphaBase Solutions, LLC

        [email protected]
        https://www.alphabasesolutions.com


        Comment


          #5
          Re: need advise/opinioin - Child records in gorups

          Peter,
          I closed out my example and retried it again without luck. I added some values to the tables and tried again. It worked fine. Odd. Nice technique!
          Mike W
          __________________________
          "I rebel in at least small things to express to the world that I have not completely surrendered"

          Comment


            #6
            Re: need advise/opinioin - Child records in gorups

            Hello everyone,

            Thanks for interest and help Peter and Mike.
            Peter - thanks for the demonstration, it works fine and is exactly was i was talking about.

            However..... as I found out (on the company meeting) my situation is a little more complex.
            Using filters on the 1-M link allows to construct filters only based on the firs table in the link.
            In my application i would like to group child records by categories that are in the subtable. I have primary table in set (like invoice_header) then the 1-M linking table (like invoice_items) and then i have Items 1-1 link to Invoice_items - to show all the details about the invoiced item. Now i want to group the tables on the form based on categories from the Items table.
            I could copy that information to the linking table (invoice_items) when new item is added to the invoice, but what if the category in some item was changed - then i will have to refresh all the corresponding records in the linking table to have the older invoices display properly.
            Another think is that this links are permanent - there is no way to change it but only by modifying the set. I need to give to the user possibility to select what categories he wants to group. (In other part of app i was showing only categories that contain specific word - that will work here to)

            Hope this is clear enough. I know this will require a lot of coding - I am not afraid of that.

            Any ideas would be greatly appreciated.

            Comment


              #7
              Re: need advise/opinioin - Child records in gorups

              Jarek, I've read this thread several times and increasingly begin to think you're trying to build a form that looks like a report. Why not build the report, instead? Is this multi-browse form going to be used for data entry? I certainly hope not. The user would have to know which browse to use depending upon the current filtering (grouping) criteria. If they enter a non-qualifying transaction into the wrong browse it will disappear when saved.

              Far better to let them enter data in any order they want, and then group it for display purposes (on report) than in a form.

              Comment


                #8
                Re: need advise/opinioin - Child records in gorups

                Tom
                Thanks for reply,

                Unfortunately this form should be both to browse and add.
                It is not used for invoices - i am using that example because everybody understands it in terms of AlphaSports.
                My company use it to build/design assemblies by adding proper subassemblies to it. Now I just have one browse with list of all components (subassemblies)- this works fine, but we found out that sometimes when building users are forgetting about some default components - like enclosure or stickers for example.
                If we have proper groups on the form it will be easy to spot mistakes - when in widow where should be enclosure is empty - now when we have all list it is hard to see if there is that line or not.
                Sure I was using different colors and/or fonts for different categories but then is just too colorful plus you know how embedded browses behave (changing order, some records are disappearing and so on)

                the idea with report could somehow work, but the main idea is to have specific components in the specified place - on report if one group of components will be long then the group below will change its place...

                I would like to have few small widows on the form with the scroll bar on the right so when is more components the list will grow inside and groups will be always in the same positions.
                I was thinking maybe to use embedded xdialog to show child records as i want - but there will be a lot of filtering, or to use HTML forms to display some tables or something....
                I was trying to use the 'accordion' on the HTM form but every time i try to put some dynamic content i have an error - but this may be something for another post......
                This accordion idea however is interesting - if I could define panes as i want and include proper content to proper panes dynamically... then maybe I will be able to get some free time this xmas.. ;)

                Comment


                  #9
                  Re: need advise/opinioin - Child records in gorups

                  Hi I having the same problem. I also need the Invoice Embedded Browse Pre-Populated with all the children, as in a kit. The rub is that each child record has it's own part number and can be sold seperately aside from belonging to a kit. If there was a way to do a search on the Invoice portion (AlphaSports), say for "wrench", the search would give you some product category selections where wrenches would exist, then would load up the parent as well as all the child records. In this way, the data entry operator could accept the entire items or edit/delete some.

                  Like the previous post, I cannot just do a report as I have to take tyhese items in and out of Inventory using a method like this.

                  Comment


                    #10
                    Re: need advise/opinioin - Child records in gorups

                    Jarek, to me this might be solved more easily by changing the input sequence slightly. Once the user selects a particular assembly, why not popup a new form or dialog that lists the typical subassemblies required? Leave general purpose fields blank for options if you want. Then use checkmarks for the user to select the desired subassemblies and a button to create the "assembly" in the database. This would create new records for each selected subassembly. You could have a button that accepts all the "default" subassemblies, to make things even easier.

                    Later if they need to see the subassemblies for a given assembly, a button on the primary form could open a second form and give them the details.

                    Food for thought.

                    -- tom

                    Comment


                      #11
                      Re: need advise/opinioin - Child records in gorups

                      Tom,
                      I started this post asking how to DISPLAY records from 1-M relation table in groups. If I am not wrong you have suggested me to:
                      create "a button on the primary form that could open a second form and give them the details." - very nice and original Idea - no more explanation needed ;)

                      [email protected],
                      I don't think you are looking for a method of displaying records from 1-M relation. From your post it seems that you are looking for solution on how to properly add records to the child table.

                      Every one else,
                      It looks like the only way to 'create groups' is by creating filters on 1-M links in set - like suggested by Peter. This is working quite nice and fast, however all the groups (filters) have to be fixed and can not be changed other way than redesigning the set and recreating indexes.
                      I managed to create what I wanted, but it was not so easy -problems with long filters, filter can be based only on one table, etc....

                      If somebody is still interested in that post I would be happy to share what I have experienced on the way.

                      If someone have another idea how to achieve the same thing (group records from 1-M table) more dynamically (like it could be done in PHP) please share it with me!

                      ...

                      Comment


                        #12
                        Re: need advise/opinioin - Child records in gorups

                        Originally posted by JarekZ View Post
                        ...
                        If someone have another idea how to achieve the same thing (group records from 1-M table) more dynamically (like it could be done in PHP) please share it with me!

                        ...
                        Jarek,

                        I think it can be done dynamically w. xbasic. At the moment I'm enjoying a nice glass of Cognac. Tomorrow I'll post something here...
                        Peter
                        AlphaBase Solutions, LLC

                        [email protected]
                        https://www.alphabasesolutions.com


                        Comment


                          #13
                          Re: need advise/opinioin - Child records in gorups

                          Originally posted by Peter.Greulich View Post
                          Jarek,

                          I think it can be done dynamically w. xbasic. At the moment I'm enjoying a nice glass of Cognac. Tomorrow I'll post something here...
                          Enjoying cognac and reading alpha forum..... i don't know.... hhahahaha
                          do you people have some life ;)

                          thanks for help anyways!!

                          Comment


                            #14
                            Re: need advise/opinioin - Child records in gorups

                            Originally posted by JarekZ View Post
                            ...you people have some life ;)
                            Yeah, well, you wouldn't think so if you took a look at my stock portfolio.


                            Attached is a dynamic recursive set.
                            Note the following:
                            • The set filters have been removed
                            • The fetch_goto code is needed because w/o it, the filter, the resynch will always jump back to the first parent record.
                            • You could put similar code in the OnInit (make sure to use "this", not "parentform") if you wish to have default value when you start up the form.
                            Peter
                            AlphaBase Solutions, LLC

                            [email protected]
                            https://www.alphabasesolutions.com


                            Comment


                              #15
                              Re: need advise/opinioin - Child records in gorups

                              Peter,
                              Thank you - this is perfect. I that case I can dynamically build filters (in case some of the categories were changed or new were added!) The only limitation in this case is the fixed number of groups - it could be worked around by defining more links and then just show on the form the used ones (I guess).

                              I will play with it when i find some time - but it certainly looks promising!

                              p.s.
                              -----------------
                              Originally posted by Peter.Greulich View Post
                              Yeah, well, you wouldn't think so if you took a look at my stock portfolio.
                              I would imagine - i just hope you can find some time outside work to enjoy it!!

                              Best wishes....

                              Comment

                              Working...
                              X