Hi @Wolfdrano can you tru this:
OnSelect =
Set(
createdRecordID,
Patch(
List_Orders,
Gallery1.Selected,
{
Title: Text(DDCustomer.SelectedText.Title),
Address: L_Address.Text, // Corrected typo "Address"
Delivered: Toggle1.Value,
Paid: Toggle2.Value
}
).ID
);
ForAll(
Gallery_orders.AllItems,
If(
Value(ThisRecord.TI_Amount_1.Text) = 0,
Remove(
SubList_Orderd,
LookUp(
SubList_Orderd,
Title = ThisRecord.Title && OrderID = createdRecordID
)
),
If(
Value(ThisRecord.TI_Amount_1.Text) > 0,
Patch(
SubList_Orderd,
Defaults(SubList_Orderd),
{
OrderID: createdRecordID,
Title: TitleLabel.Text,
Cost: Value(PriceLabel.Text) * Value(TI_Amount.Text),
'Requested Amount': Value(TI_Amount.Text) // Corrected typo "Amount"
}
)
)
)
)
Please click Accept as solution if my post helped you solve your issue. ✔️ This will help others find the solution to this problem. It also closes the item. Remember, you can accept more than one post as a solution.
If the content was useful in other ways, please consider giving it Thumbs Up. 👍
Thanks
Andrew