Forum Academy Marketplace Showcase Pricing Features

Dealing with dynamic strings

What is the most elegant way to put some data which will show the variants:

John
Mary (and 2 guests)
Brad (and 1 guest)

I mean this should take into account 0 or not number of guests and also plural form in Brad’s case.

I’d use a repeating group to display the names

In each cell

  • a label with a conditional
    The labels default text should be name + the count

— If the count is 0

—- set the Default text to the sameText without the count