You are viewing limited content. For full access, please sign in.

Question

Question

Laserfiche Forms - Assigning Laserfiche User from a Drop Down field

asked on May 23, 2016

Can you make Laserfiche users part of a drop down field in Laserfiche Forms? As part of a Travel Request form, I am trying to make a drop down field with the names of all Managers, so that when the user selects their Manager and submits the form, the form will then route to that Manager for Approval. If this is not currently possible, are there any alternatives?

 

Thanks!

0 0

Replies

replied on May 23, 2016

If you are using Laserfiche user accounts (as opposed to Windows accounts), you can create a database view that gets a list of all Laserfiche users in a particular group, such as the Managers group. Below is an example:

CREATE VIEW [dbo].[managers]
AS
SELECT *
FROM
	(SELECT trustee.trustee_id, trustee.trustee_name FROM trustee) t1
	INNER JOIN 
	(SELECT * FROM grouplist WHERE group_id = 'X') t2
	ON t1.trustee_id = t2.member_id
GO

Replace the X in group_id with your own. You can find the group_id in the dbo.trustees table. It's the trustee_id of the row where the trustee_name is the group name.

Once you create the view, you can hook it up to your dropdown field using a Lookup Rule.

This approach works very well because your dropdown list will automatically get updated as you add/remove managers to/from the Laserfiche group in your repository.

4 0
replied on November 29, 2016

Do you know if there is a way to do this for windows accounts ?

0 0
replied on December 1, 2016

I have figured out a way. I am using the laserfiche forms DB as data source and using lookup rules to query the cf_users table. works well :)

0 0
replied on March 10, 2017

I was looking for a way to do this as well. I created a stored procedure that pulls most of the info from the main Laserfiche DB, while pulling the display names from the Forms DB if required. Here's the stored procedure I used (be sure to supplement the database names and Laserfiche group names):

CREATE PROCEDURE usp_getManagers
AS 
BEGIN
SELECT ac.account_name AS Account, u.displayname AS Name FROM [LF DB].dbo.trustee t
INNER JOIN [LF DB].dbo.trusted_group tg ON tg.trustee_id = t.trustee_id
INNER JOIN [LF DB].dbo.account_cache ac ON ac.account_sid = tg.sid
INNER JOIN [FORMS DB].dbo.cf_users u ON ac.account_name = u.username
WHERE trustee_name IN ('Managers', 'Directors', 'Other groups')
ORDER BY u.displayname;
END;

 

2 0
replied on May 23, 2016

Yes you can. You would need to populate the drop down list from a lookup rule. Since lookup rules do not have the ability to populate the value part of a drop down list, you will need to have a field that is populated from the lookup rule as well with the username of the selected manager. You can then use that field in a User Task to assign it to the appropriate Manager.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.