1 2 Previous Next 15 Replies Latest reply on Jun 18, 2015 9:31 AM by philmodjunk

    related portals

    Fagreement

      Title

      related portals

      Post

      Hi,

      I have a question and I spent all the day to try to resolve it.

      I have 4 tables (Parent/Child): Cursus -> Axes -> Champs -> Matieres

      (see attach plz)

      One cusrus can have multiple Axes, on Axes can have multiple Champs, on Champs can have multiple matieres… (simple database !)

      I need a layout, where I choose cursus from dropdown list then I have automatically display in a portal the list of Axes, and when needed edit or add an Axes.

      Same way, when I click on a record in the portal Axes, I need to show in another portal the list of Champs…same way for Matieres. So 3 related portals.

      Also, in find mode, I need to show all the related fields in portals when I choose cursus table.

       

      Please if anyone can help I Thank you !

      DB.png

        • 1. Re: related portals
          philmodjunk

          Don't like the "crowsfeet" that I see on the "one" side of each of these relationships. It's OK if you are auto-entering Get ( UUID ), otherwise this should be an auto-entered serial number and that would not show the crows feet that I see.

          If you changed layouts each time, this would be simple, so I am guessing that you want all the portals on a layout based on Cursus.

          That requires a different set of relationships to do. You can keep the current set and add more table occurrences of the Champs and Matieres tables linked directly to Cursus to use for such portals.

          This is sometimes called a set of "master detail" or "master slave" portals. Here's a thread where the details for doing this are spelled out for a smaller number of tables, but the method can be extended to work for what you describe: Need layout solution for nested portals...

          • 2. Re: related portals
            Fagreement

            Thank you for your prompt response.

            Yes i changed my primary keys, it was text type, now see attach it is auto-enter serial.

            Ok to do different layouts, what do you suggest? i begin with layout based on cursus and portal for Axes?

            if so how i linked them?

            thanks so much

            • 3. Re: related portals
              philmodjunk

              Don't you want all the portals on the same layout? I so, please open the link that I shared in my last post.

              • 4. Re: related portals
                Fagreement

                NO, IN FACT i decided to make different layout.

                so each layout parent/child.

                • 5. Re: related portals
                  Fagreement

                  But now I have a problem on my layout that I create (see attach):

                  The purpose of my layout is to add a “cursus’” (parent table) and for this cursus I add multiple “axes”, but to add axes I want to link them, not to create them in the portal. The axes are already created in another layout; I want just to link them to the “cursus”.

                  My problem here is whenever I choose the axe in my dropdown list on my portal then a new record of axe is created in my axe table !

                  How can I avoid this?

                   

                  Hop I was clear L

                  • 6. Re: related portals
                    Fagreement

                    HELLO?

                     

                    • 7. Re: related portals
                      philmodjunk

                      If you choose from that drop down list in the first row, you'll modify the value of that one record. If you the second row--which represents the "add row" that appears automatically when you enable "allow creation of records via this relationship", you create a new record. To keep this "add row" from appearing, you'd have to clear this check box from the dialog of relationship details.

                      Under now circumstances will selecting a value there find different records to show in the portal. That's not how a portal works.

                      You could enter find mode and then select from this portal before performing the find, but that will find layout records that also include at least one portal record with the selected value. That doesn't sound like what you want to have happen here.

                      PS. I'm a volunteer here and I help when and if I find the time.

                      • 8. Re: related portals
                        Fagreement

                        so i understant that i have serious problem. :(

                        how can i resolve this...? i thought the portal will save my life...

                        my purpose is to link "Axes" to  one "cursus’” .. it is simple, but i don't know which approach.

                        can you help ?

                         

                        thanks for your efforts.

                        • 9. Re: related portals
                          philmodjunk

                          To do that, you will need to more fully explain what you are attempting to do.

                          It sounds like you need only select the correct "Cursus" record in order to then see a portal listing all "axes" records linked to that specific cursus record. That would not be done with a drop down list located in the portal row. It might be set up with a global field located outside the portal with a script set up to perform a find after you have selected a value in the field.

                          But I may be completely misunderstanding what you want to do here.

                          • 10. Re: related portals
                            Fagreement

                            thank you for your help.

                            In fact, what i need to do, is the opposite what you said, I mean, I want for the current "cursus" record, assign (or link) some "axes". The axes are already in the table "axes" (they are imported), it is in this layout where I want to link "axes" to one "cursus".

                             

                            thank you in advance.

                            • 11. Re: related portals
                              philmodjunk

                              There is more than one way to do what you describe. The results in the following options are NOT the same but do fit what you have so far described.

                              a) the Cursus Match field on the layout (not in the axes portal) could be set up with a value list so that selecting different values matches the current Cursus record to different Axes records.

                              b) The portal can be given a portal filter expression that includes a reference to a field from the Cursus table that is compared to the value of a field in axes. By selecting different values in this field, a different subset of the total set of related records will appear in the table. Example:

                              Relationship might be:

                              Cursus::__pkCursusID = Axes::_fkCursusID

                              Portal filter expression might be:

                              Cursus::Category = Axes::Category

                              Cursus::Category could be set up with a value list to control which records, out of all axes records with a matching value in _fkCursusID appear in the portal.

                              • 12. Re: related portals
                                Fagreement

                                i understand the 1st option, it is the classic one.

                                but the 2nd sorry i didn't well understand what to do :(

                                • 13. Re: related portals
                                  philmodjunk

                                  You need to explain exactly what you are trying to do. The first example uses a relationship to connect the current layout to different sets of portal records.

                                  The second option leaves the relationship based matching unmodified, but limits what you see in the portal to different smaller groups selected from that larger set of related records.

                                  Both fit your description of what you want, but are quite different in what they actually do.

                                  So you need to explain in more detail as it is quite possible that either option may not be appropriate for what you want to do.

                                  • 14. Re: related portals
                                    Fagreement

                                    Sorry, I don't why I am not understand...

                                    I am on a layout related to "cursus". When i am on a particular record of "cursus", i want, through a listbox, portal or whatever, link this "cursus" to a particular "axes". I can link many "axes" I want to one "Cursus".

                                    So when i navigate through records, the layout must show me all the linked axes of the current cursus.

                                     

                                    hope i was clear :(

                                     

                                    1 2 Previous Next