Total Object Count on Data Source


Our users have the option to switch projects. The button they use to switch projects is visible if they can access multiple projects.

We have a visibility condition on the button: “Project Access.Total Object Count” > 1. After switching projects 2 times, the button disappears and the total object count of the data source is undefined.

I am not sure if this is a bug (maybe it has something to do with permissions?), but it is strange that it only works sometimes.

Another strange caveat is that it seems to work fine when the users have the default language of the app, but when they use another language this bug occurs.

This sounds strange. It is a bit hard to decide if it’s a bug or not without seeing the setup.
However: what you could do is replace the visibility condition with a function reading “return projectAccess.length>1”. To do so you first need to add the datasource in question to the function editor and make sure the filter reads all objects.
If the problem still occurs it might be related to the datasource setup/read logic. If it works using the function-editor it might be a bug in or related to the condition-editor.
Would you care to give it a try and let me know what happens?

Using the function editor works fine.

I tried logging the total object count, it says"undefined", when logging the projectAccess.length, it says the correct length.


Can you provide a screenshot displaying information about the data source (“Project access” in your case) with the value of the total object count and object count and client language, as in the below screenshot? Not necessarily a screenshot, but all these values.

Screenshot 2024-01-15 at 09.24.21

Screenshot 2024-01-15 at 09.26.04


Strange one, we’ll try to see if we are able to reproduce or find som pattern with regrads to when this occurs. Let us know if you have any additional info on pattern, warnings etc (or, let us know if you e.g. are able to isolate this issue in a dev-only app, and give me access for investigation).

I was not able to reproduce the bug easily. I think you already have access to the application, we can continue the conversation via email to reproduce the bug.