I am making a Power App where a user inserts machine information into a form, and then click a button to save it. It is also supposed to log this query alongside the date.
I wanted the patch function to look at the data card values and patch those into a table, under a new record with the current date. UNIT, LOG, and MACHINE are column values that can either be typed in or not changed. The rest are all dropdown fields. I'm getting a few different errors and I'm not really sure how to address them.
The table or source changes depending on a button that the user clicks earlier in the navigation. It's a variable that gets set to a different table depending on the button pressed.
Here's the formula for the patch:
Patch(
table_archive,
Defaults(table_archive), {
UNIT: dcv_unit.Text,
MACHINE: dcv_machine.Text,
SOFTWARE: dcv_software.Selected,
PC: dcv_pc.Selected,
USER: dcv_user.Selected,
LOG: dcv_log.Text,
DATE: Today()
});
SubmitForm(form_machinedetail);
Navigate(screen_success);
These are the errors:
- Name isn't valid. 'Text' isn't recognized.
- The function 'Patch' has some invalid arguments.
- The type of this arguments 'PC' does not match the expected type 'Text'. Found type 'Record'.
I want to just add a new record/copy to the archive table while it updates the original source table. I can't seem to understand Patch too well, but I would appreciate if someone could point me in the right direction. Thank you in advance.