Hello,
not sure someone already answered this question cause when i do a search i can't find exactly what i need but...
I'm creating a form for a SharePoint list. I created different screens linked to different lists. On one of my screens, I have a form, to input new data, and a gallery that shows the data. On top of the form I have a Save button that will save my data tomy sharepoint list and refresh the view so i see the newly input data into my gallery. Formula is :
If (NewDisplayMode = DisplayMode.Edit,
If (!IsBlank(DataCardValue5.Text),SubmitForm(EditForm1); ResetForm(EditForm1); Refresh(Activity),
Notify("Cannot create record. Missing data.", NotificationType.Error)
)
,true);
UpdateContext({NewDisplayMode: DisplayMode.Disabled}); UpdateContext({EditDisplayMode: DisplayMode.Disabled})
I created Global Variables to toggle the display mode (Form activated/deactivated - Gallery activated/deactivated)
the problem i have, If i input new data, it works perfectly (according to my formula). New data is added to sharepoint, it also shows up to my gallery on my form, form is reset.
When i try to modify the already created records, so when i activate my Gallery (Form deactivates), if i hit the Save button, nothing is saved to SharePoint.
I guess this is normal since my formula doesn't take this case into account and here is my problem. I tried several things in order to readapt my formula ..... adding a Patch function within a ForAll as a second test in my condition - I did this several ways but nothing seems to be working.... I also changed the OnSuccess function of the form like this
ForAll(Gallery1.AllItems,Patch(Activity,{DPID:varID},{DeptTXT:varDept,ProcTXT:varProc,Act:TextAct}))
so when i submit the form it will also submit the changes in the gallery...this doesn't work either.
Any Idea how this could be done ?
I'm very new to Powerapps and try to figure out what to do. i followed this to do what i want but i'm missing the part that saves the modification of the gallery into SharePoint
https://www.briteglobal.com/blogs/community/powerapps-contact-manager-addnewform-editgallery/
Hope someone will be able to help...
Thanks a lot !