Query for collection count returning null on page load

Actions & Logic

I have a system for updating app state to keep track of the number of goals that exist for a given user. This is so that I can apply conditional visibility to another component.

When the page loads its supposed to update state with the number returned from the query count (as shown), however

the query is returning null even when there are goals in the database. (as shown in debugger)

Not really sure where to start with this, much appreciated.

What have you tried so far?

have tried using a regular query, as apposed to on page load action query, but that doesn't work.

There should be a way to get this to work easily, I just can't seem to find it.

Did you check FlutterFlow's Documentation for this topic?
Yes
4
6 replies