TMDM-7455: "Cannot search FK Record when having FK contains other FK"

Field expression: when field is a FK, takes the referenced field type.
Additional query builder fixes (assignable value checks).
Web ui: prevent look up for values when FK value isn't set.