Hi,
Any help is greatly appreciate it.
I have create the following patch (I need to insert records from PowerApps to Sharepoint list) and it works perfectly.
Payments = collection
SPAPLICACIONES = Sharepoint list (table B)
DOCDETALLE = form with input to table A in Sharepoint
ForAll(Payments, If(!IsBlank(Comprobante), Patch(SPAPLICACIONES,{COMPROBANTE: Comprobante, MONTO_APLICADO: Monto_Aplicado, MONTO_TOTAL: Monto_Total, MONEDA: Moneda, TIPO: Tipo, PAGO: Pago})))
However, when I add just a couple of changes to the patch formula as they are underlying below, it does not run. I have also added the changes individually but it does not run neither. It worth mentioning that the reason why I am adding the second underlying section is because I am trying to write a link between Table A and Table B, however I have not done any "Last Submit" (any advise here to replace the "Last Submit")
ForAll(Payments, If(!IsBlank(Comprobante), Patch(SPAPLICACIONES, Defaults(SPAPLICACIONES), {COMPROBANTE: Comprobante, MONTO_APLICADO: Monto_Aplicado, MONTO_TOTAL: Monto_Total, MONEDA: Moneda, TIPO: Tipo, PAGO: Pago, CPID: DOCDETALLE.LastSubmit.ID})))
Thank you in advance