3 Replies Latest reply on Oct 14, 2013 11:36 AM by philmodjunk

    Use portal to create record in the table in the end of the relationship

    calebmiranda

      Title

      Use portal to create record in the table in the end of the relationship

      Post

           I'm having a problem with creating records from relationships that are as follows:

           I have a database that has three related tables, being what I call unit_of_knowledge (uok), rules and body_of_rules (bor). The relationships are:

           Rules::BorID_fk=Bor:BorID_pk, with just one match field

           Uok::kind=Rules::kind && Uok::RulesID_fk=Rules::RulesID_pk, with two match fields.

           my problem is, I'm able to make a layout of BOR, make a portal of UOK and create related records in UOK. But that is because Rules is in the middle. What I would love to do is to make a layout of BOR, make in it a portal of Rules and, automatically, it would create also a new related record in UOK (for each created record of Rules). Is it possible? (always is; is it too hard?)

            

        • 1. Re: Use portal to create record in the table in the end of the relationship
          philmodjunk

               Bor----<Rules------<Uok

               I'm able to make a layout of BOR, make a portal of UOK and create related records in UOK

               which, BTW, might also be creating new records in Rules if one does not already exist that is linked to the current Bor record.

               It's possible to do that, but what would be the purpose? This would only create a record in Uok that is blank except for the needed match field value. That record would not be of any real use, as far as I can see, until you then added some data to at least one other field in Uok and you can create that new record at that point rather than when you first created the Rules record.

          • 2. Re: Use portal to create record in the table in the end of the relationship
            calebmiranda

                 I know that, in principle, this seems to have no real purpose. The problem is that I need a report with two different kinds of things together (with different fields), and that seems to be the best solution I've been able to find (make three tables, one is uok, the other is rules and the other is books, with the last two linked to the first - and the report would be built with portals with slide up).

                 So, actually, I have rules and books which should be one table just (but that cannot be done because of the different fields), and, with that in mind, the idea is that for each rules record there should be a uok record, and for each books record there should also be a uok record (both in a one-to-one relationship), without ever happening of a uok matching one book AND one rule, or matching none of them, but always one OR the other.

                 With this explained, the idea is that I must have a UOK record created for every rule, even if in this record there is no more information other then pk, and the compound fk, for the report to work.

                 So, please:

                 1. is that really the correct way to organize my table, according to the exposed needs?

                 2. if so, is there a way I can create that "reflex record"?

            • 3. Re: Use portal to create record in the table in the end of the relationship
              philmodjunk
                   

                        I have rules and books which should be one table just (but that cannot be done because of the different fields)

                   But this can be done. It may or may not be a good approach, but a single table can have two sets of data fields, one set to be used with UOK records and one to be used with Book records. When creating a record for uok, the "book" fields would just be left empty and the same in reverse would be true when adding data for a book record. So to say that it "cannot be done" is not correct. wink

                   

                        With this explained,

                   Sorry, but your explanation does not show why you have to have empty related fields in both child tables for every record in the parent table.

                   

                        So, please:

                   1) I don't understand your database well enough to answer

                   2) I have no idea what you mean by a "reflex" record.