Lookup Lists - Value versus Name
I have several areas where I have cascading lookups of values. The cascading is not part of the primary question, but may have an impact on the choices of responses, so I mention it up front.
My question is - how do I show the user a value AND the name, but only commit the value into the field?
For instance, I have a list of projects that my users need to select from. I can show them the project number, but that alone is often not enough for them to select the correct item. If I go the opposite way, and display for them the description, then it is often repetitive and they would get multiple choices with nothing to clearly identify the correct one. the combination of both the project and the description in the drop down is the correct solution, but I don't see how to do that.
I had thought about creating a unique view that combines both and using that, but then it screws up the value I need to pass to the cascading lookup.
Suggestions?
-
正式なコメント
There can be couple ways...
1. You can have display (Name property) text as concatenated string of project number and project description. Ex. "My Project Description - 12345" and map the value property to project number, so it can be used for the cascading lookups. This needs a source of the data to provide concatenated string of project description and project number.
2. Use the Popup Select control, which allows to execute a lookup and display multiple records in a popup window. Keep two text boxes on the form; one for project description and one for project number. Map the lookup result to those two text boxes. Set property "On Lookup Completion, Trigger Change Event For" to All Target Controls. This will allow to fire a change event of "project number" textbox, which would trigger the cascading lookup.
Option #2 would work as it is without needing to have the data source provide a separate field with concatenated value of project description and project number. Only compromise is to use pop select control instead of dropdown.
I hope this helps.
コメントアクション -
I was trying to do something similar. I wanted to use a textbox that would return the description after selecting the unique identifier (project number). I was using a SharePoint lookup that only allow you to bind the results to a multiple choice field type. So I ended up using a data grid to return the description and it works but doesn't look the greatest.
-
Thanks for the feedback... I had considered doing a custom view in my SQL DB to concatenate the values, but that just seemed to be too much of a back door fix for a product as good as AgilePoint is. There had to be a better way.
Thanks to Solution Consultants for the idea of the PopUp Select. I tested that out on a older DEV copy of my workflow, and can see how that would work to resolve the issue. Means a bit more real estate as we still have the text box for the selected value, but it gives both value and name and also allows for search filtering.
I will keep that in my bag of tricks for this type of issue going forward!
-
Creating a view in the database is one option, but views tend to live forever. I would recommend another option.
In creating a lookup, you can choose the Quick Config tab or the Manual tab. If you want to show multiple fields, choose the manual tab and concatenate the fields you want to show. For instance:
SELECT l.Company+', '+l.Address+', '+l.City as Name, l.CompanyGuid as Value FROM dbo.Leads l join dbo.Followup f on f.fuCompanyGuid = l.CompanyGuid where f.SalesRep = '${TaskParticipantUserName}' group by l.Company,l.Address,l.City,l.CompanyGuid
You don't need to join fields to do this, I included it here to show that option. the key is that you need to show the concatenated fields as Name and the key field as Value. The group by even eliminates extra records with the same data, in my case Company name.
サインインしてコメントを残してください。
コメント
5件のコメント