Thursday, August 18, 2016

eOne Extender - Lookups - Use SQL View Values in an Extender Lookup


  • You need to have eOne Extender ENTERPRISE for this to work if you want to put SQL triggers within the extender solution.
    • If you do not have extender enterprise, you can have this script run periodically from the sql job scheduler instead.
  • Create a dummy lookup that you will populate lookup values into eventually (I use the Site Setup Table)
  • Create a Trigger when you open the window that has your lookup field on it that will run a SQL script
    • In your script, delete the values in the EXT00900 table corresponding to your dummy lookup
    • In your script Insert all the values from your custom view using the dummy lookup name as the Extender_Lookup_ID, leave the dex_row_id blank, it will fill itself in
SCRIPT Example

--Clear Lookup Table values for dummy lookup
delete from EXT00900 where Extender_Lookup_ID = 'DUMMYLOOKUP'

--Insert Values from my own view
Insert into EXT00900 (Extender_Lookup_ID, STR30 ,UD_Form_Field_Desc)
Select 'DUMMYLOOKUP', Property, [Cost Center] from COSTCENTERVIEW where [Location Code] = 'S031'

No comments:

Post a Comment