I'm working on an app where I'd like to get a blank record whose columns are based on a SharePoint list.
I've tried:
ClearCollect(myCollection, First(Filter(myList, ID=-1)))
and...
ClearCollect(myCollection, myList);
Clear(myCollection)
Both of these techniques return the columns, but there technically isn't a record... it's an empty list. I want -ONE- single record that contains the columns and whose records are all nulled/blank.
The only other technique I can think of is:
ClearCollect(myCollection, Filter(myList, ID=[existing ID]));
Patch(myCollection, First(myCollection),
{
Column1: Blank(),
Column2: Blank()
...
}
)
This seems really involved, especially since my list has over 2-3 dozen columns. Is there an easier way to do this?
I want to mention that my emphasis for this question is on method, not syntax (in case I messed up my syntax for whatever reason).