Forum Academy Marketplace Showcase Pricing Features

How to concatenate two columns with conditional?

I have two columns in the database, name, and number of subscriptions

If the number of subscriptions > 0 then I want to show Name (N subscriptions) where N is the number of subscriptions but if the user doesn’t have any subscriptions, then I want to show just the name without subscription counts.

I have been using the repeating groups to display data from the datasource having name and number of subscriptions details in it.

Since Name and Number of Subscriptions are both under the same data type (say User) this is straight forward.

In the conditional tab of the text make 2 conditions as below:

  1. When Current Cell’s User’s Number Of Subscriptions = 0
    Action: Text: Current Cell’s User’s Name

  2. When Current Cell’s User’s Number Of Subscriptions > 0
    Action: Text: Current Cell’s User’s Name ({Current Cell’s User’s Number of Subscriptions} subscriptions)

And the default text value can be the same as condition 1’s text value. This will show in any fringe / unexpected cases.

Let me know if this works!

Ranjit | Blur Apps

The curly bracket is not required. the equal operator(=) was not available so I used is operator. Otherwise, it works.

Thanks, Ranjit!

:slight_smile: a little decoration makes it easy to read
But yes, ‘is’ is the equal operator

Cheers