Select one thing from a list but store another

Hello Everyone:

I am sure this problem has its name but I had search the forum with the words I think may be used and could not find anything. My problems is that I need to present the user with a list of products which I get from a view using formula language, what I need to store is the product code since we have products with the same description but different category so the product code is unique. I am using formula language in the dialog list field to get the content for the field. Any suggestions will be great.

Thanks

Subject: Use Aliases for the Choices

Set up your choice list to use aliases. The description will show in the UI, but the alias will be stored and accessable through the backend. For example, ThisProduct | ThisAlias would display ThisProduct to the user and store ThisAlias in the document.

Subject: I am using formula language to get the list

Thanks for your response. My problem is that I am doing a lookup to get the list so I am not sure how I will use the alias in that context. I have used the alias before but it is in a fix list and not in a dynamic list.

Subject: You have to arrange for your formula to return a list with entries of the form…

… “visible value|stored value”. The easiest way to obtain such a list, is probably to have a view with a column whose formula is ProductName + “|” + ProductCode (or whatever your fields are called) so that you can just use @DbColumn to read that column.

Subject: Thank you, it works perfectly.

I did not know that doing it that way will work too.

Thanks again.