def find_or_create_for_params(params, parent_column, parent_record)
      current = parent_record.send(parent_column.name)
      klass = parent_column.association.klass
      if params.key? klass.primary_key
        record_from_current_or_find(klass, params[klass.primary_key], current)
      elsif klass.authorized_for?(:crud_type => :create)
        association = parent_column.association
        record = association.klass.new
        if association.reverse_association&.belongs_to? && (association.collection? || current.nil?)
          record.send("#{parent_column.association.reverse}=", parent_record)
        end
        record
      end
    end
def find_or_create_for_params(params, parent_column, parent_record)
      current = parent_record.send(parent_column.name)
      klass = parent_column.association.klass
      if params.key? klass.primary_key
        record_from_current_or_find(klass, params[klass.primary_key], current)
      elsif klass.authorized_for?(:crud_type => :create)
        association = parent_column.association
        record = association.klass.new
        if association.reverse_association&.belongs_to? && (association.collection? || current.nil?)
          record.send("#{parent_column.association.reverse}=", parent_record)
        end
        record
      end
    end
Attempts to create or find an instance of the klass of the association in parent_column from the
 request parameters given. If params[primary_key] exists it will attempt to find an existing object
 otherwise it will build a new one.