AnsweredAssumed Answered

Record Grouping

Question asked by NaturSalus on May 29, 2012
Latest reply on May 30, 2012 by NaturSalus

Title

Record Grouping & Sorting in a Portal

Post

     Hello,

     Based on the relationships shown in the attached picture, I have a the "Appointment" layout based on the Appointment TO with several tabs.

     The relevant tabs to my question are: the "Rubrics" & the "Bach Flowers" tabs.

      

     The purpose of the "Rubrics" tab is to show the "Rubric" records related to the current "Appointment" record. In this tab the users creates relationships between the current "appointment" record and the "Rubric" records.

      

     On the "Rubrics" tab there is a portal to the AppointmentRubric TO with the following fields:

      Rubric::Rubric

 Rubric::sCategory

 Rubric::sSubCategory

      

     The users creates relationships between the current "appointment" record and the "Rubric" records with the "Add Rubric" button that triggers a script that established relationships with the "Rubric" TO.

      

     The purpose to the "Bach Flower" tab is to show the "Bach Flower" records related to the "Rubric" records selected by the user and related to the current "Appointment" record.

      

     On the "Bach Flowers" tab there is a portal to the bFlowerRubric TO with the following fields:

 BachFlower::bFlowerCommonName

 bFlowerRubric::_kf_Rubric

 BachFlower::Found. Calculation = Get (Found Count). Unstored. calculatio result is Number.

      

      

     My problem is that I don't know how to control the way data is shown on the portal  to the bFlowerRubric TO.

     I would like the "Bach Flkower" records to be shown on the portal in alphabetical order by their CommonName, so that repeated records are shown just once but if there is repetition it is accounted for in the BachFlower::Found field.

      

      

     Let us image that some "Rubric" and "Bach Flower" records have already been entered in the db and that the following relationships have been established between them:

      

     For the "Rubric" record with Rubric = Enthusiastic there are 3 related "Bach Flower" records: Elm, Vine & Vervain.

     For the "Rubric" record with Rubric = Diligent there are 3 related "Bach Flower" records: Elm, Oak & Vervain.

     For the "Rubric" record with Rubric = Perfectionist there are 3 related "Bach Flower" records: Beech, Oak & Vervain.

      

     Now let us imagine that the user has created "Appointment" record 1 and in the "Rubrics" tab adds to the portal the following the rubrics: Enthusiastic, Diligent and Perfectionist:

      

      

     Under the "Bach Flower" tab the portal to the bFlowerRubric TO shows the following:

      

      

     BachFlowerName--------------Rubric-------------Rubric Count

     Beech------------------------Perfectionist---------1

     Elm--------------------------Enthusiastic----------1

     Elm--------------------------Diligent---------------1

     Oak-------------------------Diligent---------------1

     Oak-------------------------Perfectionist----------1

     Vine------------------------Enthusiastic-----------1

     Vervain---------------------Enthusiastic-----------1

     Vervain--------------------Diligent----------------1

     Vervain--------------------Perfectionist-----------1

      

     Since the portal is based on the bFlowerRubric TO I cannot sort out the values.

     Since repeated "Bach Flower" records are not added up (as desired)  and instead are shown as individual records, the Rubric Count of all "Bach Flower" records is 1.

      

     Under the "Bach Flower" tab the portal to the bFlowerRubric TO, I would like the portal values:

      

     either

     "Bach Flower" records ordered alphabetically, repeating values shown as one but accounted for in the "Rubric Count" field

      

     BachFlowerName--------Rubric Count

     Beech--------------------1

     Elm----------------------2

     Oak----------------------2

     Vervain-------------------3

     Vine----------------------1

      

     or

     "Bach Flower" records ordered from higher to lower according to their "Rubric Count", like this:

      

     Rubric Count------------BachFlowerName

     3------------------------Vervain

     2-------------------------Elm

     2------------------------Oak

     1------------------------Vine

      

      In case this cannot be achieved from a portal in Browse mode,  I have also tried to get what I want from a Report layout on List view based on the following alternatives: Bach Flower TO, or Rubric TO, or Appointment TO, or AppointmentRubric TO or bFlowerRubric TO. But I didn't manage to get it working.

      

     What is the best way to get what I need to achieve?

      

     Thanks,

      

     natursalus

Outcomes