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

Question

Question

Populate Forms Drop Down List with Team Roles/Members

asked on April 19, 2017

We're trying to make it as simple as possible for our staff to get the forms processes they will be working to the appropriate staff to work the next step in the process. They typically need to view the form and based on the information in the form, assign the next step to either a role or specific member of a role (depending on the step in the process). 

Having the person need to review a form, approve it to the next step, then come into the Forms Inbox and assign the next task to a specific person is a lot of work for each process a user reviews. With the dynamic team assignment and filters, it makes it easier for us to get the next task assigned to the correct person if the variable is set correctly on the form.

Is there a way to populate a drop down list with members of a team in a specific role or with a list of the roles available? This would help to match the assignment to the exact variable and allow management of the roles to drive the options available on the form.

At this point I'm sure it will require some custom JS to make it work, but I'm not sure where to find a reference to the JS functions that can be called to get this type of information.

Any hints, tips or tricks are much appreciated.

1 0

Answer

SELECTED ANSWER
replied on April 21, 2017

You can actually do the same as the view in SQL with a combination of hidden fields and lookup rules (looking at the same tables from forms I reference before). The lookup rules would have to be in sequence entering values into the hidden fields. (again, no need to use Java but Java could make it a little cleaner although more complicated).

0 0

Replies

replied on April 19, 2017

You can create a view in your SQL forms database linking the tables cf_users, teams, team_members. Then just do a field lookup in the form based on team ID  and the view you created. 

1 0
replied on April 19, 2017

I think that will work but I was hoping for more of a JS solution so it can all be done from Forms without touching the database.

0 0
replied on April 19, 2017

It is not possible with JS as you are not able to get the users list with JavaScript for all the data you get from Forms UI need credential.

0 0
replied on April 20, 2017

This is not intended for an anonymous form. If the form is only used with authenticated users (named or participants), is there a scripted way to get the list of members or roles of a team?

If JS is not an available option, how would you recommend achieving the functionality I'm looking for? I will likely try the DB View and see if that will work (which I suspect it will).

0 0
replied on April 20, 2017

A lookup is the only way to accomplish this.  The data doesn't exist outside of the database, and the forms API does not have any functionality regarding teams/members.

0 0
SELECTED ANSWER
replied on April 21, 2017

You can actually do the same as the view in SQL with a combination of hidden fields and lookup rules (looking at the same tables from forms I reference before). The lookup rules would have to be in sequence entering values into the hidden fields. (again, no need to use Java but Java could make it a little cleaner although more complicated).

0 0
replied on April 25, 2017

I have been trying this and based on those tables and a few hidden fields like you mentioned it will work for us. I'm ending up having to use some JS because some of the text between the different levels isn't an exact match so the JS allows me to customize how the fields relate to each other. I'm also going to use a stored proc against the view so I can do partial matches as well.

Thanks for the help!

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

Sign in to reply to this post.