Lookup Lists - Value versus Name

Comments

5 comments

  • Official comment
    Avatar
    Solution Consultants

    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.  

    Comment actions Permalink
  • Avatar
    Scott Bennett

    Not a great solution but I created a column that had a combination of the name and description and just used that.

    1
    Comment actions Permalink
  • Avatar
    Darci Fluit

    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.

    0
    Comment actions Permalink
  • Avatar
    Randy Crundwell

    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!

     

     

    0
    Comment actions Permalink
  • Avatar
    Ron Hall

    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.

    0
    Comment actions Permalink

Please sign in to leave a comment.