You could create a custom macro function that you pass in the id of the form, and fetch the associated value from the custom table and return the value. I would think that Brendens above would return based on the index, and not the id of the form, but if it does use the id, then thats a pretty good approach! So try that first, and if it doesn't work, then you can create your custom macro funciton.
If your foreign key isn't stored by the form id, then the custom macro function may be necessary, as you won't be able to get the record that you need from the id.
Just use the Kentico api and fetch the custom table that you want and get your associated value.
https://docs.kentico.com/display/K8/Registering+custom+macro+methods