LookUp(Gate1, ProjectID.Value = galProjects.Selected.ProjectID)
The FormMode.New
is not a valid value for the Item
property. Instead, Item
expects a specific record or Blank()
to determine whether the form will open an existing record or allow creating a new one.
Item property of Form:
If(
IsBlank(LookUp(Gate1, ID = galProjects.Selected.ID)),
Blank(),
LookUp(Gate1, ID = galProjects.Selected.ID)
)
To determine whether the form should be in New or Edit mode, use the OnVisible or OnSelect property of your screen or button to set the form's mode explicitly.
If(
IsBlank(LookUp(Gate1, ID = galProjects.Selected.ID)),
NewForm(Form1),
EditForm(Form1)
)