I have a gallery of names and addresses in a gallery with all of the controls in the gallery as textinput so that the records can easily be edited. I also want to click a button and generate a new blank row (record) in the gallery.
This is the code now that is working to display all existing records.
SortByColumns(
If(
IsBlank(TextInput1.Text),
Filter(
'Home Energy Assessments',
'Assessment Status'.Value = "Pending Assessment"
),
Search(
Filter(
'Home Energy Assessments',
'Assessment Status'.Value = "Pending Assessment" &&
('Last Name' = TextInput1.Text ||
'Account Number' = TextInput1.Text ||
'Premise Address' = TextInput1.Text)
),
TextInput1.Text,
"Title",
"Premise_x0020__x000a_Number",
"Account_x000a_Number",
"Premise_x000a_Address"
)
),
"Title",
Ascending
)
I want to be able to click on a button and create a blank item in my SharePoint list and have that row at the top of the gallery and the rest of the items in ascending order by the title (Last Name) field.
Is this possible? I need the code for the button and the gallery.
My first attempt at the button code was this
Patch(
'Home Energy Assessments',
Defaults('Home Energy Assessments'),
{
Title: ""
}
)