Hi everyone,
I 'm a beginner on PowerApps (no background as developer) and I (still) have a problem with the application I'm trying to create. The purpose of the application is to manage quotes ("devis" on screenshots) including product lines ("lignes de produits/services").
On screenshots:
The workflow is to create a new quote with "+" button (a pop-in appears) and then add one or more Product Lines to that Qote.
My problem is that after creating a new quote, it isn’t automatically selected in Gallery7.
I read other posts on this forum and I tried to do it with a variable (something close to that: https://blogs.msdn.microsoft.com/carlosfigueira/2017/10/04/decouplingbrowsegalleryfromforms/). It works (information of the last created quote appears in FormViewer2), but product lines don't add up properly: they add to the quote selected when the new quote is created (instead of adding to the newly created quote).
P.S. : I hope to have been clear. As you have probably noticed, English isn't my native language
Association betwin multiple product lines and a quote :
Form2_2.OnSuccess (create or modify quote form) : Set(
CurrentSelectionedQuoteRecord;
Form2_2.LastSubmit
)
Icon1_3.OnSelect (adding product line button): Select(Icon3_5);; Relate( CurrentSelectionedQuoteRecord.'Lignes de produits / services'; Patch( 'Lignes de produits / services'; Defaults('Lignes de produits / services'); { mso_name: TextInput2_19.Text; mso_price: TextInput2_18.Text; mso_quantity: TextInput2_17.Text; mso_total: TextInput2_16.Text } ) );; Refresh('Lignes de produits / services');; Reset(TextInput2_16);; Reset(TextInput2_17);; Reset(TextInput2_18);; Reset(TextInput2_19)
Screenshots :
the table shows the last records correctly :
Hi,
Thanks, Could you try
Default:
LookUp(Devis_1; ID=First(SortByColumns(Devis_1; "createdon"; Descending)).ID)
ID is a unique field in SharePoint, but in your case it might be QuoteNumber, or whichever field uniquely identifies that row.
At this point I think we are missing something very obvious, as my tests that I initially did were able to have that item selected after every submit, regardless of previously selected item.
Cheers,
ManCat
@iAm_ManCat |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
Hi,
I tried this :
Gallery7.Default : LookUp(Devis_1;'Numéro de Devis'=First(SortByColumns(Devis_1;"createdon";Descending)).'Numéro de Devis')
But it didn't work. There is a warning : "Delegation warning. This part "LookUp" of this formula might not work correctly on large data sets". But I don't think that's the problem.
Indeed, I tried the same formula on the tab and it worded...
User | Count |
---|---|
185 | |
123 | |
90 | |
46 | |
42 |
User | Count |
---|---|
269 | |
159 | |
130 | |
84 | |
77 |