Is it possible to count how often a specific value appears in a table column?

Without running a service, does anyone know if it's possible via the formula function or alternative to 'count' how often a constant appears in a specific table column?

I'm assuming it's not possible hence would running a JS be a viable solution namely using a FOR loop with IF condition on the desired column to run through the table length?

Many thanks for any suggestions
Stephen

If all the data is in a table object in the form then you could leverage javaScript to identify and count rows that match your desired criteria.

Just loop through the table, if the value in the row matches your criteria then increment the count.

Unfortunately, I'm still struggling with this hence I would appreciate some more help ...

I've grossly simplified the situation, but let's suppose the images below are tables in Leap.

First we need a full table: all the companies and all the services.

We then need to iterate based on Company hence 'Acme' becomes the first input constant for a service, Ester AG the second etc.

Each service needs to be triggered using JS and row values iterated for JS variables and Leap field population, consequently we need to be sure the service has successfully completed, hence the use of a listener:

# Run MyService without constant
# Listen MyService + on success

# Iterate through each company

# Run MyService with constant 'Acme'
# Listen MyService + on success
# Iterate through each row

# Run MyService with constant 'Ester AG'
# Listen MyService + on success
# Iterate through each row

[...]

As you can see, I'm effectively 'nesting' run & listen & iteration.

Can anyone please help with the JS structure or alternatively suggest another solution?

Many thanks
Stephen