Jhonatan Teixeira
08/13/2025, 3:24 PMYvonne Changamuka
08/13/2025, 3:44 PMJan Kos
08/13/2025, 7:25 PMRaffaella Gozzini
08/14/2025, 7:16 AMFrancisco Antunes
08/14/2025, 8:45 AMFrancisco Antunes
08/14/2025, 9:21 AMuserid
attribute from the dataset survey_attempt_answers
- and that particular dataset seems to be currently empty.
Could it be that the UDFs were mistakenly applied to the wrong attribute? I see another ID
attribute, from the Users
dataset, that seems much more appropriate - and matches some values in the UDF. Those are currently not being limited at all, from what I can see. Please check that!
Also, are users currently having issues when opening their visualizations? As I mentioned, I was unable to reproduce the problem - if you had an example user and visualization that failed for me to try out, it would be very helpful 🙂Raffaella Gozzini
08/14/2025, 9:23 AMJhonatan Teixeira
08/14/2025, 9:24 AMJhonatan Teixeira
08/14/2025, 9:33 AMsurvey_attempt_answers
so that would be linked with users table right, then if there are no records we just expect to display no records in the insight instead of error 500?
We have this same logic for other workspaces which don't fail on error 500, and seems to work fine, which is the strange thing
but let me know in case you see anything we could change in the MAQLFrancisco Antunes
08/14/2025, 9:51 AMsurvey_attempt_answers
and the rest of the model, but those are M:N
(many-to-many), and in many cases indirect. UDFs do apply across the LDM, but they do so following the direction of the arrows connecting it to other datasets (meaning: if a dataset is on the “right” of the model, the UDF will not propagate to those on the left of it).
The M:N
connections complicate things, though, to the point where it’s not reliable whether the user IDs from the survey_attempt_answers
will actually limit the users from the Users
dataset - and if the LDM or connections are complex enough (which they seem to be), this can break visualizations that rely on M:N
connections.
E.g.: survey_attempt_answers
connects to Users
via Survey attempts
, through 2 M:N
connections. Meaning: Multiple users can take surveys; Surveys can be taken by multiple users; answers can come from multiple surveys, and each survey has multiple answers. If you try to limit the users from those IDs present at the survey answers, it would not limit any users who didn’t make any survey attempts, for example. If that is the case, the query will not be able to connect to any other part of the model that requires Users
as a connection point - and that can lead to a 500.
In one example visualization, BLG Objectives report
, I found that by removing Team Name
from the filters, it stops the 500 from occurring. Then we get the “No Data for your Filter Selection” we expect. This suggests that this particular connection point is confusing our backend to the point of throwing the 500.
Okay, that was quite a lot of words! 🙂 I hope it helps explain what’s going on, though. Here’s my proposed fix: Modify the UDF so that it applies to the Users
dataset, which from what I can see is central to the LDM and from where a lot of those connections and interactions stem. I believe that will resolve (or at least greatly improve) the issue.
Does that make sense?Jhonatan Teixeira
08/14/2025, 10:49 AMFrancisco Antunes
08/14/2025, 10:52 AMRaffaella Gozzini
08/15/2025, 9:52 AMUDFs do apply across the LDM, but they do so following the direction of the arrows connecting it to other datasets (meaning: if a dataset is on the “right” of the model, the UDF will not propagate to those on the left of it).What does that mean in practice in our case? In summary, we use these user filters so that our users (team managers) can only see records related to their team members (the array of user IDs we are using for the filters). When you say "the UDF" wouldn't propagate to other data sets, do you mean there is a possibility of exposing data pertaining to other users? And for data tables that don't contain a user ID, should these users with UDF applied see no data or all data? Thanks in advance for the clarification
Francisco Antunes
08/15/2025, 10:52 AMSimply put, the UDF will be applied to all dataset attributes that are in the LDM along the direction of the arrows. The filter is not applied against the direction of the arrows in the LDM.So if a dataset doesn’t contain the ID, it will not be filtered at all. Here’s an example from my environment: 1. Order Lines and Product are linked, like shown in screenshot 1. 2. I created a simple UDF that limits my user’s visibility based on Order line id, to a single record (screenshot 2). 3. If I check an attribute from the Products dataset, it will show me everything (see #3). 4. However, once I bring Order line id into the mix, it limits the data to only those brands that match the ID I have available for my user. What I’m hoping to illustrate here is that while the filtering will not apply to datasets that do not contain the ID you’re using, you can easily structure either your visualizations or your LDM so that either the unfiltered data is always contextualized by the filtered one, or that it won’t matter. I.e.: knowing what brands are available in the data (in my example LDM) is not at all sensitive, and doesn’t impact the limitation on the order lines. In the end, it is up to your LDM - if there are other pieces of information that are sensitive and not at all related to Users, then the solution would be to also add them to a UDF. If only the info related to Users matters, than the UDF applied to the main User dataset will definitely do the trick.
Raffaella Gozzini
08/15/2025, 11:02 AM