Hi! I have a list in SharePoint that contains several fields. Users fill out these fields, and based on the values they enter, the default values for fields in another list need to be populated automatically. The two lists are connected by a Lookup field called “Request Number”. Users can submit the initial list multiple times, and each time, the values from the most recently submitted item should be transferred to the second list. However, I am facing an issue where the values from the first submitted item are being transferred instead of the most recent one. the thing is if the request number is different the latest values are transferred but if user use the same request number, values from the first item created with that request number is transferred not the last one. How can I resolve this in PowerApps?
Here are more details about the second form: OnSelect property of NewForm button in the gallery is set to:
NewForm(Form2);Set(Varnum,"now"); Set(VarSpecial, First(Sort('Form1',Created,SortOrder.Descending))); Navigate(Form2Screen);
I put a label in the form2 to get the value and Id of the request number of latest record from form1: Label1 for value:
First(Sort('Form1',Created,SortOrder.Descending)).'Request No.'
and Id in label2 :
First(Sort('Form1',Created,SortOrder.Descending)).ID
and defaultSelecteditems for Request number :
If(Varnum = "now", {Id: Label2.Text, Value: Label1.Text },Parent.Default)
any help would be appreciated.
thank you