Project and Portfolio Management Practitioners Forum
cancel

Token for Autocomplete List

Highlighted
Sevent3
New Member.

Token for Autocomplete List

There probably is a simple solution to this. What I'm in need of is an auto complete list to be populated based on a query. What I am doing is calling a script that returns possible matches to a name in an LDAP directory. The idea is the user inputs a name, and the autocomplete field will populate with possible matches, and then the user selects a name from that list. I'm not sure how to pass in the name to the script as I don't see any tokens for validations that would meet my needs. What is the name of the text field that in the autocomplete list where the user would type in something and then click the list button to bring up matches. That is the field I need to pass into the script.

Thanks in advance

2 REPLIES
Jim Esler
Acclaimed Contributor.

Re: Token for Autocomplete List

Basically, what you need to do is execute your script in a validation configured with "command With Delimited Output". Since this kind of validation will not pick up any value entered into the field before calling the script, you need to use two fields. We have request types that do exactly what you describe as follows:

 

  1. Define a text field that accepts the id to be searched for.
  2. Define a field called Validate that calls the script that will search LDAP using the value entered in the first field.
  3. Rules are defined to populate request fields (including the first field) with values extracted by the LDAP search.

Asterisks can be added to the search value if you want to specify pattern matches.

 

This is not the optimum solution that we would prefer but it is the only approach that we have found to work around the limitiations in this kind of validation.

Utkarsh_Mishra
Acclaimed Contributor.

Re: Token for Autocomplete List

With respect to performance improvement, you can import the enable/eligible user form LDAP and inster into custom table (schdeule a daily SYNC batch job for this).

 

Then in validation pick the list directly from this custom table.

Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)