passing values with autocomplete

passing values with autocomplete

I am building a data-entry form  with 2 fields. One called ' VERSION_ID' that I can populate with a simple php. For each VERSION_ID there will be several 'TRIM_ID's coming from a table with basically 2 columns, ie, 'TRIM_ID' and 'TRIM'. TRIM being the description of the trim. This table has about 300 items.
TRIM is the column I want to show in autocomplete as this is the information the person entering the data knows, but the data I need to pass on for insertion is TRIM_ID.

If I had less data I would easily handle this with a drop-down selection, but this is too much for that.

I do not see in the demo nor in the documentation of the Jquery autocomplete where to place the value to be passed, in my case TRIM_ID.
Thanks