I have an app in Power Apps that registers contract information with suppliers and stores it in an Excel sheet. The app includes a screen where the user can specify the number of suppliers (via an input box), and fields for each supplier are automatically generated.
I’m using the ClearCollect
function to gather supplier information into a collection (LeverandorCollection
), and then a ForAll
function to iterate through the collection and save the data to an Excel table. However, while the form data is saved correctly, the data from the collection (supplier-specific information) is not being transferred or saved to the Excel sheet.
Here's the Patch
function I'm currently using:
ForAll(
LeverandorCollection;
Patch(
Tabell2;
Defaults(Tabell2);
{
Leverandør: ThisRecord.LeverandorNavn;
'17 Organisasjonsummer': ThisRecord.OrgNummer;
'19 Kontaktperson leverandør (navn)': ThisRecord.KontaktNavn;
'20 Kontaktperson leverandør (epost)': ThisRecord.KontaktEpost;
'21 Fakturamerking/referanse': ThisRecord.FakturaReferanse
};
RegistrerFlereLeverandører.Updates
)
)
Despite this, only the form data is saved, and none of the supplier data from the collection gets through. What might be causing this, and how can I ensure the supplier data is saved correctly?