I have a txtCSVData control where user can paste their comma separated values in this format:
Business Unit, Department, Project Name, User Name
and my trigger to push the data into my grid like gallery is control called btnImportCSV,
in that button i have a code that split the data entered in the txtCSVData which looks like this:
ClearCollect(
colDataImport,
ForAll(
Split(
CSVData.Text,
Char(10)
),
Split(
Value,
","
)
)
);
Reset(CSVData);
Back();
after it goes back to the previous screen, I need to generate the unique ID but how to I do that if I have this code already:
If(
CountRows(colDataImport) > 0,
Set(
varNumber,
varNumber + 1
);
ForAll(
colDataImport,
Collect(
colGridData,
Patch(
varNewRecord,
{
ID: varNumber,
// 'Process ID': GridProcessID.Text, // the code needs to go into the field called GridProcessID.Text and needs to be pushed into the sharepoint list
Date:Today(),
'Business Unit': First(ThisRecord.Value).Value,
Department: Last(
FirstN(
ThisRecord.Value,
2
)
).Value,
'Project Name': Last(
FirstN(
ThisRecord.Value,
3
)
).Value,
User: Last(
FirstN(
ThisRecord.Value,
4
)
).Value
}
)
)
)
);
Thank you!