Dropdown User Lists

Usually when you create a link dropdown, you simply set the "Link" setting of a field to point to where you want to list to be pulled from.

However, in the case of the Users list, this can get a little tricky because by default users can only view their own user record, not others. This is done for security purposes.

To get around this we have to go to the field that is linking to the Users list, and then go to the Advanced area underneath it:

Add that and you'll see a form like this:

In there, set the "Suppress Link Security" to "Yes". This will suspend enforcing security for that one dropdown list, allowing you to see all users.

OK, the problem now is that you may not want to see ALL users. You may only want to see users with particular roles. That's fine, but adding this also means using another advanced feature.

Going back to the Advanced form, you'll see an entry called DbfScript Link. This lets you enter in some DbfScript that returns a path to use for the dropdown. This is useful because it lets us add FILTERS to the dropdown, so we can only see specific users.

Let's say, for example, you want to only see users who are managers. In that case you would use a script like this:

&root/Users[Roles/RoleID="Manager"]

In this example we're filtering based on the value of a sub-record, Roles. But you can use any kind of filter. For example to have a list of clients that are active,

&root/Clients[Active=true]

 For more information about DbfScript, click here.


Next Topic:
v4.2.0.956 (beta)
Up Since 2/29/2024 12:02:23 AM