Hi all,
I have a Power App for my form integration. Rather than have 1 form only and having to Hide/Show based on a dropdown selection, I chose to have two different Screens, both of which save to my single SP List.
The problem I am facing is form 1 saves no problems, my other form won't. I feel my logic is ok. is this possible what i'm trying to do? I understand about targeting forms on different pages, but I've not come across OnSave where there are multiple save form choices.... I've only ever seen tutes with View, Edit and New separate pages.
Am I approaching this incorrectly, and maybe go back to just one "New" form? I hope not, because the design of the forms is very specific for the use case, and I didn't want to show/hide based on request type...
Some details:
Screen 1 for adding new: FormNewItem (Form: SharePointForm) works perfect, and saves to my SP list
Screen 2 for adding new: FormNewItemSigns (Form: SharePointFormSigns) won't save (OnError just says problem)
Variable: SharePointFormMode - used to define what page I'm on (also trying with active screen)
SharePointIntegration
- OnCancel
ResetForm(SharePointForm);
ResetForm(SharePointFormSigns);
ResetForm(SharePointFormEdit);
- OnEdit
Set(
SharePointFormMode,"EditForm"
);
EditForm(SharePointFormEdit);
Navigate(
EditFormScreen, ScreenTransition.None
);
- On Save
If(
App.ActiveScreen.Name = "FormNewItem" || SharePointFormMode = "NewForm",
SubmitForm(SharePointForm),
App.ActiveScreen.Name = "FormNewItemSigns" || SharePointFormMode = "NewFormSigns",
SubmitForm(SharePointFormSigns),
App.ActiveScreen.Name = "EditFormScreen" || SharePointFormMode = "EditForm",
SubmitForm(SharePointFormEdit)
)
- OnNew
NewForm(SharePointForm);
NewForm(SharePointFormSigns);
Set(
SharePointFormMode,"NewForm"
);
Navigate(
FormNewItem,ScreenTransition.None
);
- OnView
Set(
SharePointFormMode, "ShowForm"
);
ViewForm(SharePointForm);
Navigate(
FormNewItem,ScreenTransition.None
)
- OnCancel
ResetForm(SharePointForm);
ResetForm(SharePointFormSigns);
ResetForm(SharePointFormEdit);
Navigate(
FormNewItem, ScreenTransition.None
);
Set(
SharePointFormMode,""
);
FormNewItem screen

FormNewItemSigns screen

Any thoughts are really appreciated.