Liveview heex template variable scope errror

How are you assigning the @record variable in your LV code ? what does inpect show ?