Set portal container repetition based on another field's value
This should be so easy but I don't know why I'm having so much trouble.
I have a container field with 5 reps. First is blank and then the remaining four have icons representing different leaves of absences. (ie. Vacation Leave, Sick Leave, Medical Appointment, Earned Day Off)
I also have another field called SummaryLeave where you pick from these four absence types, so the value will either be blank or one of these four.
I have all of this in a portal set to display the upcoming leaves of absences for the next seven days.
All I want to do is have a calculation that evaluates whether SumaryLeave is blank and if not, which of the four is selected and then tell the container field in that portal row to display the appropriate image (repetition).
My scripting knowledge is certainly not expert but I'm not a novice either, I just can't figure out whether I should have calculations on the container field, or on a portal's tab, or possibly have another container field which displays the results of the calculation or I guess, whether I even have my script calculation written correctly.
Any help is appreciated.