Skip to main content
March 8, 2023
Question

Data filtering based on user access

  • March 8, 2023
  • 6 replies
  • 0 views

Scenario is need to filter the data based upon user access to certain business unit id,forum id.Business unit id's are different sectors of business and they are mapped to certain forum id's.Business unit can have duplicate forum id's.

they are stored in table like 

user id bu id forum id
117 4 80
117 4 103
117 4 114
117 19 80

19 also has records with 103,114 forum id but we need records on the above mapping but when we try to filter it out by querying and storing in a local variable not able to filter out records for mapping of(19-114,19-103).

local!buid(filter:userid),

local!forumid(filter:userid,buid),

In a interface we are using a record type in data and in filter we are using logical expressions.

6 replies

Known Participant
March 8, 2023

first you will get business ids by user

local!businessIds : filter by user.

Then to get all forum ids : filter by local!businessId so that you will get all the forum ids which are tied to the business unit which user has access to it.

March 8, 2023

in current code 

local!existinguser buid,

local!forumid,

logicalexpression(

filter(recordtype!field.buid,

in,

local!existinguser buid,) 

then same for forum id )

issue is appian filters in business unit id column are returning all records of 4,19 and all the possible cases of (4-80,103,114) and 

(19-80,19-103,19-114) but we need (4-80,103,114) and 19-80

Known Participant
March 8, 2023

local!businessIds : filter by user.

Then to get all forum ids : filter by (local!businessIds and user id)

will give possible combination of 117 user id and (4  or 19) bussiness ids.

stefanhelzle0001
Brainy
March 8, 2023

Did you consider using record security rules?

venkatrea696188
March 9, 2023

Instead of doing all this go with Record security. It's the easy way around i guess