Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
10 replies
Subscribers
9 subscribers
Views
5813 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Data and Records
Security
jurim409
A Score Level 1
over 8 years ago
Hi,
I create a record with a grid.
In my grid there is a list of requests, where I have the requestor and the manager.
When a user go to the record, i woul like him to see the requests, where he is a requestor or a manager.
Is there a way to do it?
Thanks in advance
OriginalPostID-247196
Discussion posts and replies are publicly visible
0
rodgraham
Certified Lead Developer
over 8 years ago
Have you read the records tutorial?
forum.appian.com/.../Records_Tutorial.html
.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
rodgraham
Certified Lead Developer
over 8 years ago
or
forum.appian.com/.../Service-Backed_Record_Tutorial.html
. If you use a service back record you could add into the query a filter where loggedinuser is the requestor or manager. I'm assuming your data is in the database
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Navajith K
over 8 years ago
You can make use of the default filters to display only the records for which the logged in user is the requestor or manager
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sridevik7401
Certified Lead Developer
over 8 years ago
@jurim409....from your post i understand that you are trying to provide security for the records to access.
In that case first create a group and assign members to that group and use these two functions fn!isusermemberofgroups() and fn!loggedInUser() to give record access
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chandu
A Score Level 2
over 8 years ago
As per my Understanding. You are displaying a records using Grid View. if you have a field that has value as a requestor or manager,
as Navajith suggested, you can use the default filters to display records for the logged in user where logged in user is either requestor or Manager
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
jurim409
A Score Level 1
over 8 years ago
Hi,
I prove to use Default Filters, but, if I create the two filters(requestor= loggedinuser(), manager=loggedinuser()), it consider them as 'requestor= loggedinuser() AND manager=loggedinuser()'. Instead of that, I will need 'requestor= loggedinuser() OR manager=loggedinuser()'.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
rodgraham
Certified Lead Developer
over 8 years ago
If you use a queryentity you can use an OR statement
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Chris
over 8 years ago
Since you cannot utilize OR on Default Filters, and cannot access rf! data within the value portion of the filter configuration, the only way we've found to implement this type of security is by switching to Service Backed Records as mentioned above, with data coming from a!queryEntity(). There was an enhancement request submitted in 2015 (AN-60876) to expand Default Filters to be expressionable and dynamic, I'm not sure if there was any traction on that - but this has been a pain point for us as well - although, Service backed records are satisfying our needs currently.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Mike Schmitt
Certified Lead Developer
over 8 years ago
A cheap workaround for this might be to use a View for the record source entity (I think this is already best practices) - and add a column in the View where you concat the requestor & manager. Then the default filter can be like "requestorAndManager includes loggedinuser()" - i think this might work but haven't tried it, so take it with a grain of salt.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
jurim409
A Score Level 1
over 8 years ago
Hi,
We solve the problem, adding a group for each process, where there there are the security, and we save the group name in the DB. Thanks for your help.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel