Hi @PowerApps11 ,
This should be the structure you are after assuming the current serial number would be in the last record of the SP List
With(
{
wID:
Value(
Substitute(
First(
Split(
Last(SPListName).OrderID,
"_"
)
).Result,
"OrderID",
""
)
),
wCol:
ForAll(
Sequence(CountRows(YourCollectionName)),
Patch(
Index(
YourCollectionName,
Value
),
{RowNo: Value}
)
)
},
Patch(
SPListName,
ForAll(
wCol As aPatch,
{
OrderID: "OrderID" & Text(wID + aPatch.RowNo) & "_" & Text(Now(),"ddmmyyyyhhmmss"),
Field1Name: aPatch.Field1,
Field1Name: aPatch.Field2Name,
. . . . . . . .
}
)
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
MVP (Business Applications) Visit my blog Practical Power Apps