Hi All,
I have a single table to hold all the input data for a form split across two screens.
The Landing page / Screen1 simply has a Edit form and links to a table as a datasource. (tblConflictOfInterest).
Here is the first page on submit. The Default mode is New
(Would be great if I can set the textboxes so that they cannot be edited here as a side note, I pre-populate the values from Office365 looks ups if anyone knows a quick way around this.)
Set(varGUID, Office365Users.MyProfile().Id);
SubmitForm(formMyForm);
Navigate(Screen2)
On Screen2 I have another Edit form and have the below on a 'Next' button: This forms Default mode is Edit.
Patch(tblConflictOfInterests, LookUp(tblConflictOfInterests,EmployeeNumber = varGUID, { Controlling: InputControllingInterest.Text, CompanyOfficer: InputCompanyOfficer.Text, EmployeeNumber: varGUID }));
// This checks the current table for the existing record and matches the GUID
The two textboxes Screen2 are multiline text and map to the 'Controlling' and 'CompanyOfficer' cells.
Only issue is that instead of updating the existing row, it creates a new row.
I have checked to confirm the variable is indeed flowing to the second screen via a text field set to value of VarGUID.
Any ideas?
Thank you
RD
That fixed it, thank you!
Hi @RandomDept ,
I found that the parentheses in your formula are in the wrong position.
Please try this:
Patch(tblConflictOfInterests, LookUp(tblConflictOfInterests,EmployeeNumber = varGUID), { Controlling: InputControllingInterest.Text, CompanyOfficer: InputCompanyOfficer.Text, EmployeeNumber: varGUID });
// This checks the current table for the existing record and matches the GUID
Best Regards,
Wearsky
Did you use patch function like above formula, and it created a new item rather than updating the existing item?
Correct, The code I used is:
Patch(tblConflictOfInterests, LookUp(tblConflictOfInterests,EmployeeNumber = varGUID, { Controlling: InputControllingInterest.Text, CompanyOfficer: InputCompanyOfficer.Text, EmployeeNumber: varGUID }));
// This checks the current table for the existing record and matches the GUID
I suggest you add a label to display the value of the variable(varGUID), so that we can monitor the change of the variable value when we patch the data.
Good news is this field is always showing the expected GUID.
Hi @RandomDept ,
It's weird.
Did you use patch function like above formula, and it created a new item rather than updating the existing item?
I suggest you add a label to display the value of the variable(varGUID), so that we can monitor the change of the variable value when we patch the data.
Best Regards,
Wearsky
Apologies, missed that bit...
Yes I can confirm a new gallery returns a match.
Currently just as 'Text'
Hi @RandomDept ,
Can I ask what's the data type of 'EmployeeNumber' column?
And if you add a gallery with items 'LookUp(tblConflictOfInterests,EmployeeNumber = varGUID)', will it show any outputs?
Best Regards,
Wearasky
stampcoin
17
ankit_singhal
11
Super User 2025 Season 1
mmbr1606
9
Super User 2025 Season 1