Using report varaibles to determine row level conditions

Table “tbl_ACL_User” is filtered by email and results in a single record.
The field [PermittedProjects] contains the list of projects that the user is allowed to view.

A report variable (parameter) is defined [var_PermittedProjects] which is the query result from getting the single value in the tbl_ACL_Users and field=[PermittedProjects]. This results in “GB01A, GB01B” as the two projects that the specific user is allowed to view.

In the table “tbl_ModelHealth_Checks_Details” there is a field [Project] which lists the current project value for each row of data.

Due to the field number limiation for creating blended data sources, I am unable to create a blended file which contains all the attributes from tbl_ModelHealth_Checks_Details and tbl_ACL_User. Thus I need to find another way which will allow for the filtering of tbl_ModelHealth_Checks_Details based on the value contained in [var_PermittedProjects].

Thus, I would like to create a calculated field in the “tbl_ModelHealth_Checks_Details” file that reflects the following:
Security_Project = if (CONTAINS_TEXT(var_PermittedProjects,Project),“Allowed”,“Not-Allowed”) where [var_PermittedProjects] is a report variable (parameter) and [Project] is an attribute within tbl_ModelHealth_Checks_Details.
I could then apply a filter to this dataset based on the results of the Security_Project check

1 Like