I didn't build it! I was just called in to fix it. The app is full of items not named so I've spent the last two days trying to figure out how this app works.
This app has a Submit button with OnSelect:
SubmitForm(CreateBundleForm);
The "CreateBundleForm" has OnSuccess (with changes made from this thread)
Patch(
Inventory,
{
ID: CreateBundleForm.LastSubmit.ID,
IDRef: CreateBundleForm.LastSubmit.ID,
'Invoice Number': "False"
}
);
NewForm(CreateBundleForm);
Set(var1,Blank());
Set(var2,Blank());
Set(var3,Blank());
Set(var4,Blank());
Set(var5,Blank());
Set(var6,Blank());
Set(var7,Blank());
Set(var8,Blank());
Select(ResetButton);
and "ResetButton" has OnSelect:
NewForm(CreateBundleForm);
Set(var1,Blank());
Set(var2,Blank());
Set(var3,Blank());
Set(var4,Blank());
Set(var5,Blank());
Set(var6,Blank());
Set(var7,Blank());
Set(var8,Blank());
Select(BtnConfirmError);
And "BtnConfirmError" has OnSelect:
UpdateContext({Alert:false});
Set(serial1,Blank());
Reset(BarcodeScanner)
To me, this looks like it does the same thing multiple times and only submits two pieces of data into an existing ID. There are objects that seem like they'll display if an existing tries to be submitted, but I can't tell how they execute yet.
There are a lot of areas this app is working harder than it needs to, and I'm trying to simplify it. It has some code I haven't come across before, such as "LastSubmit".