How to Conditionally Filter Data on a Record Default Filter

Hello,

I am trying to include a default filter on one of my records that only gets applied if a certain condition is met. This is the scenario:

The record has a group ID field I would like to filter on. If the user is in a certain group, I want to only show the records whose groupId = the groupId of the user.

However, if the user is part of a different group, I want to show all the records.

 

What I've tried so far is this: default field is groupId, operator is "IN", and the value compared to the field is as follows:

if(

userIsMemberOfGroup, (checking if logic needs to be applied)

userGroupId, (if so, only show records relevant to this user)

getAllGroupIds (if not, I want to show all groups, so I made a get all groupIds rule)

)

 

The problem that arises is that there is the potential for the record itself to have a NULL in the groupId field. In this case, and if the user is a member of the group that should see all records, I still want to show this record with no group to the user. However, when checking if the NULL groupId is in the allGroupIds list, it returns false and the record doesn't show up. I've tried appending a null to the allGroupIds list, but that doesn't work either. Unfortunately Appian doesn't let you conditionally apply default filters; it only lets you conditionally change the value the default filter compares against.

Any ideas of how to handle this scenario?

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data