Forum Academy Marketplace Showcase Pricing Features

Turning "list of names" (list of texts) into "total names on list" (number)

Hi!
Inside my “waitlist” data type I have a “list of names” field (in list of texts format) and I want to have a “total names on list” field (in number format).

What can I do in order to keep the “total names on list” doing a constant count of the total amount of names in the “list of names”? I don’t want to use any buttons, I need it to keep updating automatically every second without any user action.

Thanks in advance!

Hi @fcastillosa.apps

You can manage such behavior by using a backend data trigger on the Waitlist type detecting any change on the “list of names” field. Each time this field changes (ie text added or text removed), you update the counter.

Check the following steps to replicate the behavior:

For the example I user the datatype User to which I added the filed Names as a list of texts and NbOfNames which is the counter.

I configured a data trigger with the condition “User Now’s Names:count is not User Before Change’s Names:count” (ie the list changed).

And the action trigged is just to update the counter.

This is the result
nameCounter

Best,

Arthur

2 Likes

Great Arthur! Thanks a lot

@arthur.kieffer, now I am trying to show different “waitlists” (data type) in a repeating group that sorts them by the amount of names that each one have in the count. However, I want the repeating group to show just the first 5 of them with the greater vote count and show their current cell index number (1, 2, 3, etc).

I want the user to select the waitlist that he wants to check out using a drop-down input in case that he wants to check a waitlist that is not on the top 5 exposed in the repeating group.

I guess I just have to create some dynamic text boxes below the repeating group conditioned by the drop-down input, the problem is that I need to show the index number for the waitlist that is appearing outside of the repeating group and since it is not in the repeating group it doesn’t gives me the option of “current cell index”.

What can I do to add the index number to the “waitlist” that is outside of the repeating group? Remember they are indexed by their “names on list” count, descending. So the first waitlist is the one with the greater “names on list” count.

I would appreciate any help, thanks!