Please help - Gallery Select broken after modifying canvas app gallery item properties

Hi everyone,

Need help since I'm very new to PowerApps.

I want to be able to filter the items on my gallery based on "Initial Shelter" column.

But since "Initial Shelter" column is a lookup column, I had to set my gallery item properties to :

Search(
  AddColumns(
      Filter(Animals, 'Animals (Views)'.'ReadyFoster'),
      LookupTitle,
      'Initial Shelter'.ShelterName
  ),
ShelterSearch.Text,
LookupTitle
)

Afterwards, I inserted an edit form to be able to select and edit an item from said gallery,

Gallery1
.Selected

but the form item properties is not working, it returned a msgs "Invalid formula, expected a value compatible with 'DataSource'" with "Selected" underlined with red.

What can I do to be able to provide a form to edit the selected gallery item where the gallery items are filtered based on "Initial Shelter" column.