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

Question

Question

How are dynamic team filters constructed?

asked on January 30, 2017

I'm struggling to configure a team-based user task based on variables using the new 10.2 functionality. I'm assigning the team name based on a variable, and trying to use the dynamic filter option, but I'm not sure what to put in the "Filter name" field.

When I use the name of a filter I created in the "Assign task to a specific team" dialog, the process returns an error "No filter could be found with the name 'Primary Contact'. [LFF6108-RuleNotFoundByName]".

When I try to use the JavaScript syntax ($result=team.findMembersByRole('Primary Contact')) in that "Filter Name" field, the process returns an error "There is no team with name ''. [LFF808-TeamNameNotFound]".

What is the proper way to use this feature? Thanks!

2 0

Answer

SELECTED ANSWER
replied on February 2, 2017

Hi there,

Dynamic Team (based on variables) and filter means you can choose which team or filter you want to use by choosing a variable, and that variable value will be used as name of the team/filter applied to your task. Since variables can be dynamically changed as you process flows, team/ filter can be dynamically changed as well, depends on how you configure them.

However, data you fill in “a team based on variable” will not create team/filter for you – you will need to choose those ones already exist in your system, to make it work properly.

 

Here’s an example

 “User Task” is assigned to a dynamic team, where team name is a field variable and filter name is a string  ”non-submitter filter”. (Note that I’ve created “non-submitter filter” in my system and I configured the field picked in “Team name” in a way that it could only have existing team as its value.

When running the process, as long as the field “{/dataset/Assign_to_this_team}” has a valid team name as its value, this task can be assigned to that team and filter (team member who is not submitter in step 20) will be applied.

 

Let me know if you have any questions.

Thank you.

1 0
replied on February 3, 2017

Ok, Thanks. This got us on the right track. I think we may have discovered a bug in the process, too. To summarize what works:

  1. Make a user task and on the assignment tab, choose "A specific team."
  2. Use the Filter editing tools on this section to create a filter for each team that you want to use as a dynamic team. In our case, we created a filter with the same name "primary contact" for each team.
  3. Then change the assignment selection to "A team based on variables."
  4. Check the Dynamic filter box, and insert the name of the filter you created above.

As for the bug... We had some pre-existing teams and filters from our 10.1 installation before upgrading. It seems that any filters we had created using 10.1 do not work with the dynamic filters in 10.2. We had to delete the existing filters and recreate them on the "A specific team" section before we got things working.

0 0
replied on February 3, 2017

Yes, those are the correct steps. We'll update the documentation to clarify that, see if there's a better user interface to indicate this behavior and investigate the possible bug. Thank you for reporting these issues.

0 0
replied on February 3, 2017

Could you please provide us more detail about your team configuration and dynamic team setup regarding " any filters we had created using 10.1 do not work with the dynamic filters in 10.2 "?  It should work and we'd like to look into it if it's not.

Thank you.

0 0
replied on February 7, 2017

Sure. The steps we followed were:

  1. In Forms 10.1, created several teams, Team A, Team B, and Team C for example, in the standard way from the Administration area. Within each team, we created 2 roles (Primary Contact, and Backups) and divided the users into each role.
  2. Constructed a process with an initial form, containing a checkbox field that explicitly listed each of the teams we set up.
  3. In the process modeler, after the initial submission, we had a parallel gateway with one branch for each of the teams we had created. Each branch corresponded to a single team, and had a User Task on it that was assigned to that team.
  4. For each of those User tasks, we used the Filter option from the process modeler to build a filter that would send the task to the users with the "Primary Contact" role. We named this filter "Primary Contact" consistently across each group (yes, the filter name was identical to the role name... maybe not a best practice). The rest of the process doesn't matter.
  5. When 10.2 came out, we wanted to change this explicit parallel gateway to a dynamic teams setup. Performed an in-place upgrade to Forms and then upgraded the Forms database from FormsConfig. No errors or issues with this.
  6. Went into our process and deleted the parallel gateway, all of the conditional outflow paths, and all but one of the User Tasks. Reconnected the initial submission to the remaining user task with a new outflow path with no conditions.
  7. Went into the settings for the remaining User Task and noticed that all of our existing groups still had their filters as well (carried over from the upgrade). I then changed the radio button from "A specific team" to "A team based on variables."
  8. Entered the filter name "Primary Contact" into the dynamic filter field.
  9. Ran through a submission with the process, and it becomes suspended on the User Task, with the error message "No filter could be found with the name 'Primary Contact'. [LFF6108-RuleNotFoundByName]"

To resolve the issue, I simply went into the user task and used the "A specific team" section to delete all of the existing "Primary Contact" filters. I then used the same interface to re-make the filters (using the exact same script expression), only this time I saved each filter as "Primary" instead of "Primary Contact". This was mainly so I could easily tell which groups I'd updated and which ones I hadn't, but you never know if there is some weird naming bug.

I can't give you any screenshots or exports of the process in the non-functional state because we have since corrected the problem. Hope that helps.

0 0
replied on February 22, 2017

Hi Scott, 

Thank you for reporting this issue.

We figured out there's a bug in 10.2.0 that team filter couldn't be resolved properly when multiple teams happen to have filters with the same name.

So in your case it could be the team you chose that made it work (e.g.: you have "Primary" filter created in TeamA, TeamB and TeamC; filter works when you dynamically assign to TeamA but doesn't work if you choose to dynamically assign to TeamB or TeamC). So potentially the issue is there if those teams are still having filters with the same name.

This issue will be fixed in the coming hotfix.

Thank you.

Lifei 

0 0
replied on September 22, 2017

Thanks for all of the extra info on dynamic filters.  I look forward to this information being added to the help website so the end users have easy access to it.  A couple of related follow up questions.  What happens if the Team exists but the filter:

  1. Does not exist for that team?
  2. Does not have any people assigned to it?
  3. Is not valid because it calls a value (e.g. a role) that does not exist for that team?

 

My hope is that for all 3 it just assigns it to the team still and does not just die.

Also, was the bug with the identically named filters resolved?

0 0
replied on May 31, 2021

Was this issue ever resolved?  I'm bumping into exactly the same issue in Forms 10.4.4.444.  I'm selecting the team based on a variable and using a dynamic filter to pick the users but the teams have identically named roles.

Am I going to need to make sure the role names across teams are unique?

Screenshot.png
Screenshot.png (10.05 KB)
0 0
replied on June 1, 2021

The dynamic filter should be set to the filter name, not the JS method. You can use the same filter name under each team. 

Filter Name: CANum Role

JS: @result = team.findMembersByRole(...)

then in the config you can put

Team Name: {/dataset/Team}

Dynamic Filter: CANum Role

You can hard code the dynamic filter to that filter name if all the teams a filter with that name. 

1 0
replied on June 1, 2021

Thanks Jared, I had created another topic for this one and managed to get it sorted out with the same advice.  Appreciate the help!

[LFF6108-RuleNotFoundByName] Error on Dynamic Filter - Laserfiche Answers

0 0
replied on January 8, 2023

We also enhanced the UI in Forms 11 Update 3 by adding tooltip to the dynamic filter to help users understand what they should enter in the dynamic filter input

0 0

Replies

replied on February 13, 2017

The filters of the section "A team based on variables" work correctly if can't exist 2 filters with the same name, for example if we have 2 teams with a filter called "Primary Contact" it will cause the error "No filter could be found with the name 'Primary Contact' [LFF6108-RuleNotFoundByName] ", I solved this by placing the name of the team in the filter name, ie for team1 I have a filter called" Primary Contact-team1 "and for team2 I have a filter called" Primary Contact-team2 "and with this the errors were solved.

I hope it works for all of you

Regards

1 0
replied on May 8, 2018

My bad. It worked.

 

The only mistake I was doing that I created the filters with same name for different teams. I had to rename all the filters for different teams. Now dynamic filter is working with team selection based on variable.

1 0
replied on February 2, 2017

Is this documented anywhere?

0 0
replied on February 2, 2017

It's documented in the help file. Could you post a screenshot of the filter definition? From your description and error, it sounds like you might've put the JavaScript in the wrong textbox?

0 0
replied on February 2, 2017

I'm working on this project with Andy. We have tried many things at this point, but I think I can give you some screenshots to get at the heart of the issue.

1) If you choose "A specific team" you get the filter dropdown, and you can create a new filter. This we can get to work, no problem:

2) We don't actually want to use it this way. We actually want to use the new (10.2) dynamic team assignment. So we instead choose "A team based on variables." So far, so good. Now, if we want to assign this task to a particular role within the team, which has been dynamically assigned, there is a different Filter box here. We can't figure out how to get this box to work:

We are unsure what to put in this Filter box. We have tried using the Role Name directly, inserting the javascript (copied from the working javascript on the "specific team" option) as you see above, and we have also tried creating a filter for the team using the Specific Team option, and then using that filter name "Primary Contact" as you can see in the first screenshot.

None of these options works so far. What's the correct syntax for this Filter?

1 0
replied on February 6, 2018

Could you solve this point? I have the same problem, I do not know what is the correct syntax to apply filters for dynamic allocation

0 0
replied on April 30, 2018

Lifei has the right idea in her answer. Use the variable picker to pick a team, then set the filter to use the filter name as shown below. In her example, the same filter is being applied regardless of which team is selected. For example, this would work if every team had the manager role and you want to assign a task to a specific team's manager, or as shown, if you want to dynamically assign a team, but use a filter to eliminate any previous submitter. 

You could also use another variable to dynamically assign both team and filter. To do this, you'd have to modify your form so that wherever you set the team variable, you also set the filter variable to the correct filter name. Then you can have a specific filter based on whichever team is chosen. 

0 0
replied on May 7, 2018

My dynamic filter works if I select a specific team. But it doesn't work if I select a team based on variable. Can anyone help on how to make it work?

 

Non of the options worked for me what's mentioned in the marked answer.

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

Sign in to reply to this post.