Hi @F4b ,
Could you please share a bit more about your scenario?
Do you want to relate the multiple Product Line records with the submitted one Quote record?
Firstly, if you want to patch all Product Line records within your Gallery (Gallery7_1) into your Product line Entity once time, please take a try with the following formula:
ForAll(
Gallery7_1.AllItems,
Patch(
'Lignes de produits / services';
Defaults('Lignes de produits / services');
{
'Libellé ' : DESCRIPTION;
Quantité : QUANTITÉ;
'Prix unitaire' : 'PRIX UNITAIRE';
Total : TOTAL ;
}
)
)
More details about the ForAll function, please check the following article:
ForAll function
If you want to relate the multiple Product Line records with the one submitted Quote record, I think the Relate function could achieve your needs.
I have made a test on my side, please take a try with the following workaround:
Set the OnSuccess property of the "Submit form" (Edit form, that you mentioned) to following:
Set(
CurrentSubmittedQuoteRecord, /* <-- Save the submitted Quote record into a variable */
SubmitForm.LastSubmit
)
then please modify your Patch formula as below:
Relate( /* <-- relate the current submitted Product Line record to the previous submitted Quote record */
CurrentSubmittedQuoteRecord.'Lignes de produits / services', /* <-- 'Lignes de produits / services' represents the relationship betwen your Quote Entity and your Product line Entity */
Patch(
'Lignes de produits / services';
Defaults('Lignes de produits / services');
{
'Libellé ' : Gallery7_1.Selected.DESCRIPTION;
Quantité : Gallery7_1.Selected.QUANTITÉ;
'Prix unitaire' : Gallery7_1.Selected.'PRIX UNITAIRE';
Total : Gallery7_1.Selected.TOTAL ;
}
)
)
Please check and see if the following article would help in your scenario:
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-relate-unrelate
Best regards,