How to add text after count values(numbers)

Hi

I need to add some text after count values(numbers)

Like,

1 bought
1 views

Use a template column. For text that expresses plurality (1 view / 2 views), use an if then else column first.

3 Likes

https://thinhdinhlca.github.io/plural-text/

You can use this directly in your experimental code column.

2 Likes

I remember this. Does it actually provide any advantage over the if-then-else column? :thinking:

1 Like

It just saves one column, and since it’s just for display purposes I don’t have to worry about its problem with forms/webhooks.

1 Like

Can you show me a real example of how you use it?

I’ve just been playing with it, and even had a look at the source code, and I just don’t get it. I mean - I don’t see how it saves any columns.

Here, instead of having to add an ITE column (if product count = 1 then X product, else X products) then a template column to change X to the actual number, I only have to use this.

I see.
But if you use the example that Bob gave above (parents with children), then you’d still need an extra template column to construct the full sentence, right?
In which case, it hasn’t saved any columns.

1 Like

Yes, in @Manikandan_R’s case it helps, but in Bob’s case you’re right.

1 Like

How do you provide source?

How to give this.what should be given

Can you show me the ite column of this.

It would be something like:

  • If countChildren = 1, then Child
  • Else Children

Okay.thanks

How template column to be construct for this.

Want to combine count + ite column value

Here is an example:

  • The first replacement {days} is the count of the item, in this case a number of days
  • The second replacement {daydays} is the result of the if-then-else column
2 Likes

Thanks a lot Darren.