Hello once again!
I am trying to count the amount of items in a Table scheme.
Example:
Get amount of “anmalningar” in the Table “Aktiviteter”
How is it achievable?
Hello once again!
I am trying to count the amount of items in a Table scheme.
Example:
Get amount of “anmalningar” in the Table “Aktiviteter”
How is it achievable?
Use the following block to get a number of objects in a table (or a number of objects matching a query):
How should I query it?
On page enter it collects all events and places them into a dynamic list.
Inside of that dynamic list there are multiple activities (Aktiviteter) with multiple registrations (anmalningar).
I need to get from every single activity the amount of registrations made.
This gives me an error.
I know I am doing it completely wrong because it does not makes sense… but I cant find a way around it…
What does the relationship in the database look like between activities and registrations?
It’s a simple 1 to many relationship.
This is a relationship between activities and users. You can see it say right there RELATION TO: Users
.
I am asking about the relationship between activities and registrations.
That is the registration, there are no forms, when the user creates an account, the current user account will be linked to the event.
The current user can register / remove registration simply by clicking a button in the dashboard.
So you want to know the count of users for each actiivity?
Yes
I used this block
It gives me this error:
Another follow up question:
What is the difference between relations and properties in this block?
To my understanding relations loads a list with objects from an API, the properties does exactly the same thing???
Here’s a visual description:
Relations load related objects (entirely).
Properties load specific property values.
And regarding the second error:
Regards,
Mark
Hi again Mark,
I really apologize, you guys must be fed up with me and my questions… But it doesn’t work.
I notice that it loads the count of “anmalningar” but everything else is not loading.
Can it be something else?
Best regards,
Rafael
Hi Rafael,
What is the name of the page where you have that logic?
Regards,
Mark
Hi Mark!
The page is “dashboard_ungdom”.
Best regards
Rafael
What is the flow to get to that page in your app? The page expects currentUser to be in AppData, that object will not appear out of nowhere. There is got to be some logic elsewhere that puts the user into AppData. Please provide clear instructions.
Regards,
Mark
In the index page there is a “Logga In” button on the header that takes the user to the “login” page.
When the user logs in, it sets the variable “loggedInUser” into:
On that page enter
I created a page called dashboard_mark
. I fixed the query there and the data is now loaded. The rendering of the UI is messed up, this is something you need to fix.
Regards,
Mark
Thank you! I found the rendering issue, it is a reusable element that is not loading properly for some reason.
Thanks a lot for the help!