Brenden Kehren
-
8/24/2012 9:31:52 AM
RE:Add non-db field to document type for transformation
I've done this for several dropdown list or combobox list selections. You would have to make the field a persistant field in your current document type but instead of storing a PK, store the text from the custom table.
For instance your CustomTable.Field2 has the data in it you want (text). CustomTable.Field1 is the primary key. In your custom documenttype, create a field that is a dropdown and then create a select query to gather the data from your CustomTable. SELECT Field2 AS [Value], Field2 AS [Text] FROM CustomTable ORDER BY Field2
Then in your transformation to display, just reference the Field2 which should be storing the text from your CustomTable. Not the cleanest way, but it works. You could also write a Macro or method that gets that "name" based on an ID if you need to store the primary key, and the just reference either the macro or the method in your ascx file.
|