Apologies for the confusion. In that case, you can try using a variable to store the current payment amount within the ForAll loop. Here's an updated version of the formula:
Patch(
PPayments,
ForAll(
Filter(
ColPProject,
tglPPayment.Value
) As aCol,
{
Title: Now(),
'Payment Amount': Value(txtPPaymentControl.Text),
RecordID: aCol.ID
},
{
// Initialize a variable to store the current payment amount
paymentAmount: Value(txtPPaymentControl.Text)
}
)
)
In this formula, we added a new line within the ForAll loop that initializes a variable called paymentAmount with the value from txtPPaymentControl.Text.
Then, when assigning the 'Payment Amount' field in the Patch function, you can use this variable instead of directly referencing txtPPaymentControl.Text. Here's the updated line:
'Payment Amount': paymentAmount
With this change, each record in the ForAll loop will use the payment amount stored in the paymentAmount variable, ensuring that each row has the correct value.
Please give this updated formula a try and let me know if you're still experiencing any issues.