This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - PLM Solution Needed: Create a Dropdown List that Accesses Identities (Users and Groups)

Jarad - Thursday, June 30, 2016 12:14 PM:

I would like to setup a dropdown list that accesses (pulls from) Identities (users & groups of users) so that a user can choose the Identity quickly instead of performing a search or typing in the complete name.  The list should populate as the user types; an example of this is seen in the "PR" Item Type under the TOC Access tab, when editing the Category.

I am planning to add this feature to a workflow where Users will choose Approvers, Acknowledgers, etc. that will be assigned to the workflow's activities.  Note that Auto Assign has already been implemented by a PLM consultant; however, the user must type the full name or search for the Identity at this time whereas a Dropdown List of Identities would greatly increase efficiency.

Can I simply create a LIST of all Identities and then map it to the LIST, or will the call fail b/c it's not the actual Identity in the system?



dennis - Thursday, July 7, 2016 12:28 PM:

I can think of a couple of ways to do this.

1. Create a new list that will hold the users' names in the label and the corresponding alias identity guid in the value of the list. Associate the list to a new property on the itemtype. Display the list on the form. Write a method client or server method that takes the value from the new property and copies it to the existing property that the users are populating today (with the search). 

Advantages: Simple method to write. Able to limit the entries in the list. 

Disadvantages: Keeping the list up to date with the users. It's a little "messy" and not very elegant (but it gets the job done). Have to get the alias identity guid and paste into the list.

2. I haven't tried this fully, but should work. On the form, create a new dropdown. Make the datasource the property that is currently being filled in by the user with a search. Write a method that dynamically populates the list with the appropriate users (label: user's name, value: identity guid of the user). If you have access to the training material, there is an example of dynamically populating a list. There may be references in the forum, but I'm not sure. 

Advantages: No need to keep a list in sync. No method to keep two properties in sync (like above). Able to limit the entries in the list by having the method that populates the list read the members of a specific identity, this would make changing which users show in the list very dynamic and easy to change.

Disadvantages: More challenging to implement (maybe). 

Hope this helps,

Dennis
Razorleaf 

 



Jarad - Monday, July 18, 2016 5:11 PM:

Thank you for the reply Dennis.  Note that I do not have a C# or JavaScript background; however, I am learning C# now; therefore, I cannot create any methods as of yet.

I do not plan on using a Form directly to apply the Dropdown List or present the user with the Dropdown List from a Form but from a relationship (tab) on a Form.  If you look at the screenshot below you will see an example of what I am trying to accomplish.  The system apparently treats data from a List as a Dropdown by default, but when using Identity as the Data Source the system expects the user to type the full name or search instead of a simple dropdown list.

I like your option 2 with implementing a Dynamic filled list as long as I can apply the list to the relationship (tab).  The relationship would need to take the name from the list and find the Identity in order to use the Identity to populate the assignment on a particular activity; can you offer additional suggestions/solutions?  When I reached out via Xtreme directly to Infor/Aras they said that it will be an enhancement request, which could take a while.