3 Replies Latest reply on Jan 14, 2013 1:09 PM by philmodjunk

    Colour-coding linked Portal rows

    tays01s

      Title

      Colour-coding linked Portal rows

      Post

           I have 2 portals on a layout. If you choose a 'patient name' portals are filled with that patient's a) Prescriptions and b) Records. So that it is easy to see what Records relate to each Prescription (eg. you might have 1 or more Records per Prescription) I'd like all records dated on or after a prescription to have the same row colour as that prescription and, of course, the prescription before and after are different colours.

            

           Both portals have dd calender fields.

        • 1. Re: Colour-coding linked Portal rows
          philmodjunk

               Is there a field in Records that identifies the Prescription to which it should be linked?

               And how would you designate a color for the Prescription? Will a two color scheme work for that (odd numbered prescriptions are white, even numbered are yellow...)?

          • 2. Re: Colour-coding linked Portal rows
            tays01s

                 An 'fk_Prescription' if that's what you mean.

                  

                 Colours: Alternate colours would suffice, but it would be clearer to have say 4 colours in rotation.

            • 3. Re: Colour-coding linked Portal rows
              philmodjunk
                   

                        An 'fk_Prescription' if that's what you mean.

                   Which allows us to have this set of relationships:

                   Records>-----Prescriptions 2

                   Records::_fkPrescriptionID = Prescriptions 2::__pkPresciptionIDs

                   Where Prescriptions is a new occurrence of prescriptions. I am assuming that Prescriptions is the occurrence referenced by your prescriptions portal on your layout and that Records is the occurrence referenced for the Records portal.

                   What you describe can be done but the color coding has some tricky details--especially if you use filtering and/or delete records in Prescriptions portal We'd need a field in Prescriptions that is used to asign it a color via a conditional format and then the fields in the Records portal can use the same value in conditional formats to match colors by referencing the same field in Prescriptions 2. But the tricky part is making sure that this field gets the correct value and also updates correctly if you change what records appear in the Prescriptions portal.

                   Have you considered this simpler alternative?

                   Set up the prescription portal rows as or with a button that when clicked shows only those Records in the Records portal that are linked to that prescription. This "master-detail" portal set up avoids this issue with setting up that "color control" field to always have correct values.