I have a screen with 18 text input boxes. I cannot use a form due to the design for the scrren, so I created 18 patch statements as follows:
Patch('[dbo].[tblAppItemDevelopment]',galItemSelection.Selected,{ItemSetupWidth: Value(txtItemSetupWidth.Text)});
Patch('[dbo].[tblAppItemDevelopment]',galItemSelection.Selected,{ItemSetupDepth: Value(txtItemSetupDepth.Text)});
Patch('[dbo].[tblAppItemDevelopment]',galItemSelection.Selected,{ItemSetupHeight: Value(txtItemSetupHeight.Text)});
Patch('[dbo].[tblAppItemDevelopment]',galItemSelection.Selected,{ItemSetupWeight: Value(txtItemSetupWeight.Text)});
Patch('[dbo].[tblAppItemDevelopment]',galItemSelection.Selected,{SellingUnitWidth: Value(txtItemSellingUnitWidth.Text)});
Patch('[dbo].[tblAppItemDevelopment]',galItemSelection.Selected,{SellingUnitDepth: Value(txtItemSellingUnitDepth.Text)});
Patch('[dbo].[tblAppItemDevelopment]',galItemSelection.Selected,{SellingUnitHeight: Value(txtItemSellingUnitHeight.Text)});
Patch('[dbo].[tblAppItemDevelopment]',galItemSelection.Selected,{SellingUnitWeight: Value(txtItemSellingUnitWeight.Text)});
Patch('[dbo].[tblAppItemDevelopment]',galItemSelection.Selected,{InnerCartonWidth: Value(txtItemInnerCartonWidth.Text)});
Patch('[dbo].[tblAppItemDevelopment]',galItemSelection.Selected,{InnerCartonDepth: Value(txtItemInnerCartonDepth.Text)});
Patch('[dbo].[tblAppItemDevelopment]',galItemSelection.Selected,{InnerCartonHeight: Value(txtItemInnerCartonHeight.Text)});
Patch('[dbo].[tblAppItemDevelopment]',galItemSelection.Selected,{InnerCartonWeight: Value(txtItemInnerCartonWeight.Text)});
Patch('[dbo].[tblAppItemDevelopment]',galItemSelection.Selected,{InnerCartonCasePackQuantity: Value(txtItemInnerCartonQtyPer.Text)});
Patch('[dbo].[tblAppItemDevelopment]',galItemSelection.Selected,{OuterCartonWidth: Value(txtItemOuterCartonWidth.Text)});
Patch('[dbo].[tblAppItemDevelopment]',galItemSelection.Selected,{OuterCartonDepth: Value(txtItemOuterCartonDepth.Text)});
Patch('[dbo].[tblAppItemDevelopment]',galItemSelection.Selected,{OuterCartonHeight: Value(txtItemOuterCartonHeight.Text)});
Patch('[dbo].[tblAppItemDevelopment]',galItemSelection.Selected,{OuterCartonWeight: Value(txtItemOuterCartonWeight.Text)});
Patch('[dbo].[tblAppItemDevelopment]',galItemSelection.Selected,{CasePackQuantity: Value(txtItemOuterCartonQtyPer.Text)});
Navigate(scrMainScreen,Transition.None)
If there is a better way to do that, let me know, but that isn't my problem. When I press "Submit" which is where the above code is, only the first 6-8 fields get written back to the SQL table. I can verify this on the SQL server.
But, if I navigate back to that screen, all fields are populated. Each field has the following formula:
If(gvarEditMode = "Edit", galItemSelection.Selected.ItemSetupWidth,"")
So the values the user inputs are still in memory, and the fields populate. If I make no changes, and hit Submit again, another 4-8 fields get written to the SQL server. Do it again and they finally all get written.
It is like it is timing out so partially gives up.
I don't think this is relevant as they all do get written, but the GUI is inconsistent for these Patch statements. Notice how the items in the red box are not purple? Those are valid text boxes, and I used the AutoComplete to fill that in. Just tossing this in in case it is relevent. My main concern is I want all 18 PATCH() statements to happen when I press Submit.
