Question Data Store: Getting the Count of Specific Rows

Is it possible to get the count of records with a specific field value in a data store? I’m able to retrieve individual records using ‘where’ syntax, but would like to have conditional logic based on the number of records with a specific value.

I suppose I could count them by executing a flow that repeats and counts the specific value. But I thought I’d check here if there are any functions or syntax I’m missing that could do the trick. Basically I’m looking for the combination of count() with a where clause. Thanks!

H there! I’m not at my computer, but I’m pretty sure you just put the .count() after the .where within the flow you are working in!

Hi - thanks. You are correct. I had a different syntax error that was causing the unexpected result. Here is the syntax that worked: {{datastorePicks.data.where(pickstatus, 'cardR1', 'startsWith').count()}}

1 Like