2 Replies Latest reply on Aug 11, 2014 11:30 AM by bhurt

    Conditional formatting portal rows-- Self() as the searchString in PatternCount()

    bhurt

      Title

      Conditional formatting portal rows-- Self() as the searchString in PatternCount()

      Post

           I'm attempting conditionally format a portal using Self() as the searchString in PatternCount.

           The formula syntax I'm using is:

           PatternCount ( Health_session_ANIMALHEALTHTREATMENT_gSession_gTreatmentFiltered::_animalID_fk ; Self )

           In short, the portal is a list of animals in a group receiving medical treatment--it contains a field AnimalID_pk--this is the field I am attempting to conditionally format with a different fill color.  The layout is an input form to record medical treatments on each animal in the group.  My goal is to highlight each animal in the portal as it receives medical treatment, so the user can easily see which members of the group have been treated, and which have not.   Health_session_ANIMALHEALTHTREATMENT_gSession_gTreatmentFiltered is a TO containing the treatment records for the active treatment session.  

           The intent is this:  for each portal row, self() returns the text contents of AnimalID_pk; PatternCount uses that as the searchString; PatternCount then counts each record in Health_session_ANIMALHEALTHTREATMENT_gSession_gTreatmentFiltered::_animalID_fk that contains the text from that row's AnimalID_pk; if it counts a record, the formula will trigger the conditional formatting for that field (and change its fill color).

           In my sample test data,  three animals have received treatments.  Their records are in Health_session_ANIMALHEALTHTREATMENT_gSession_gTreatmentFiltered::_animalID_fk .  However, the conditional formatting is only working on the first animal's portal row.  It is not working on the other two.  

           To trouble shoot, I have a portal showing Health_session_ANIMALHEALTHTREATMENT_gSession_gTreatmentFiltered::_animalID_fk .  It shows the records for all three animals.  So I know the records are in the TO.  But the conditional formatting formula is not counting them and changing their fill color.

           Any help would be appreciated.  Thank you.