Determine fid_attribute dynamically