Is it possible to filter records based on user signed in to quickbase?

  • 0
  • 1
  • Question
  • Updated 4 years ago
  • Answered

I have an application that has user IDs(emails) in a record to send notifications.  Is it possible to limit the user that logged into Quickbase to only be able to see the records where they are listed in the "lead" column for the person that submitted the record?

Photo of Brian

Brian

  • 140 Points 100 badge 2x thumb

Posted 4 years ago

  • 0
  • 1
If you want it totally locked down in Permissions, then set up a Role called Only see where User is Lead, and make it a Custom Rule

where [Lead] is "the current user"
Photo of Brian

Brian

  • 140 Points 100 badge 2x thumb
Ok so I made the Role and in the View and Modify columns I setup a Custom Rule by setting "The Lead"   Contains   "the current user".  I did not see "the current user" as an option.  Do I just enter "the current user" in that field?
Ah, I assumed that the [Lead] was a user field.  What field type is [Lead].  You said it was a user field.  Maybe its just an email field.  if its an email field, then you could make a new field using this function https://www.quickbase.com/db/6ewwzuuj?a=dr&r=ex&rl=ia called IsUserEmail.  Then filter access based on that field.
Photo of Brian

Brian

  • 140 Points 100 badge 2x thumb
Lead is a Text field with the leads name in it (i.e. John Doe).  Should I change it to a "User" field?
If you can do that, it makes things way way easier.
Photo of Brian

Brian

  • 140 Points 100 badge 2x thumb
ok I changed the "Lead" field to a User field.  Still not sure how to do this however.  Thanks for your assistance.
Photo of Brian

Brian

  • 140 Points 100 badge 2x thumb
Also went ahead and selected the user that has the "filled in torso icon next to them".  I assume this is Quickbase recognizing the user name as a registered user?
Photo of Brian

Brian

  • 140 Points 100 badge 2x thumb
How do I enter "the current user"?  Is it <the current user> or is it "the current user"?
If Lead is a User field, then when you go to set up the Role Permission, it will offer up "the current user" as a choice.  You will not be typing anything.

When you are selecting a user to fill in the data entry area of the form, you should be able to select from Users who have access to that application by starting to type their name or email address and it should offer you choices.
Photo of Brian

Brian

  • 140 Points 100 badge 2x thumb
ok so when I am setting up the custom rule here is what I am doing:  
1.  I click on my table then select Settings - Access.
2.  In the View and Modify columns I select  "Custom Rule".
3.  I click the pencil icon next to the View and Modify columns.
4.  Select the Lead field from the drop down.
5.  Select Contains from the middle dropdown.
6.  The Third field. where you are saying I should see "the current user" as a choice, I do not have a dropdown list of options.  It just a text field.  This is confusing me.
What field type is [Lead]
Photo of Brian

Brian

  • 140 Points 100 badge 2x thumb
I think I got it.  The Lead field data is part of a Table to Table relationship.  I needed to make the field a User field in both tables.
Photo of Brian

Brian

  • 140 Points 100 badge 2x thumb
can I compare a User Field and a text field?
It's not a good idea.  You can convert a user field to text with UserToName([my user field]), but the spelling maybe different.
Photo of Brian

Brian

  • 140 Points 100 badge 2x thumb
I am trying to create a rule on a form that displays or not displays a section named Lead Approval.  The rule I am trying to create is this.  If the Lead (a registered User) clicks the "add a new record" button I don't want them to see the Lead section (they don't need to approve their own request).  However, if the Lead, receives notification of one of their employees has submitted a request for approval I want them to be able to see the Lead Approval section and approve or unapprove the request.  Users submitting the requests are not registered users and have the following information in a Employee table:  Employee (text), Lead (User Field), Lead Email (Email Field), Employee Email (Email field).  One way I thought I might be able to create the rule is to compare the Employee text field to the Lead User field.  If they equal each other hide the Lead Approval section.  Is there a better way?
Thanks for all your help.
Sure, you can try that and use the formula I suggested above to get the Lead's name in text form. Note that users enter their own names and you have no control over how they enter their name.  But it will probably work.
Photo of Brian

Brian

  • 140 Points 100 badge 2x thumb
Ok so I did that and typically the User field displays user names in the format of "Lastname, Firstname".  After creating my LeadtoText field the name is in the format of "Firstname Lastname".  Is this going to be a problem?
You can set the format for how the user name displays.  That does not affect how it really exists.
Photo of Brian

Brian

  • 140 Points 100 badge 2x thumb
Just wanted to thank you for your assistance.  I think I have it.  Thanks again!
The for letting me know!