I am having trouble while joining sales order header with sales order line in power apps i am using No field of Header and Document ID of Line but the issue i am facing is document id property is locked while editing its properties and also is not accepting data in input i have created 2 screens one for sales order header and one for sales order line in header there is a form with multiple fields which is accepting data on basis of customer no field that is matching from customers table No, now there is a button to accept data into sales order header and second button is of navigate by this code
Navigate(Screen2, "None", {SelectedHeaderID: Form1.LastSubmit.'No.'})
that is taking the sales order header data to the screen 2 that is sales order line where i have edited this
Filter('salesOrderLines (v2.0)', 'Document Id_DataCard4' = SelectedHeaderID)
into the item filter of screen 2 but the error i am having is
Name isn't valid. 'SelectedHeaderID' isn't recognized.
also one more thing there is no Document No field in the sales order line table that's why i have to make a join with No and Document ID
Please suggest me what to do