Hello friends, I'm trying to develop an app that will allow field users to go to a site location, check off a few things, and upload a file if they have to. Finally I was able to get attachments work using SubmitForm. Previously I was using Patch. However with SubmitForm, I can't seem to add a new record. It keeps overwriting the one record I have. Using Patch with resetform worked fine. But SubmitForm is not working as I expected. The attachment I made still displays even after I use Reset Form. Here's screenshot of what my form looks like (in picture below). I removed the attachment so it says "no attachment to display".
Can anyone tell me what I'm doing wrong here? Any help is appreciated. I'm still super new to PowerApps so dont scream at me 🙂
Solved! Go to Solution.
Since you have an separate form for adding new items, please ensure that its mode is set to "New" This can be done via the NewForm(Form_Name) function.
You could set the EditForm mode to "New" right sfter submitting. I think this will do wnat you need.
Just set the
Screen1.OnVisible=UpdateContext({fff:FormMode.Edit})
Form1.Mode=fff
and then after submitting:
UpdateContext({fff:FormMode.New})
I'm sorry but you'll have to guide me through the steps...still trying to understand how it all works. Where do I start with "Screen1.OnVisible = UpdateContext({fff:formmode.edit})"? Also what is fff?
I will explain each step:
Screen1.OnVisible=UpdateContext({fff:FormMode.Edit})
This just means that you have to select your screen (not the controls on the screen - Screen1 in this example), find its "OnVisible" property in the properties panel on the right and paste UpdateContext({fff:FormMode.Edit}) there.
This just basically defines the "fff" variable and initializes it with FormMode.Edit value. You can use any name instead of "fff" (as long as you update it in all other dependent formulas).
Form1.Mode=fff
Similarly to above, Just select your Form on your screen, finr the "Mode" property on the right and paste "fff" there (replacing any old values).
UpdateContext({fff:FormMode.New})
This is the action to set the form in the "New" mode so it shows controls in "New: mode. This action can be run by a button, in which case you have to paste it in the "OnSelect" property of a button (Button1.OnSelect=UpdateContext({fff:FormMode.New}))
Hope this helps.
I tried following your steps to the dot, but still no luck 😞
Can you please elaborate on issues you see?
Since you have an separate form for adding new items, please ensure that its mode is set to "New" This can be done via the NewForm(Form_Name) function.
Thank you Dinusic! You are a life saver. Much appreciated!
User | Count |
---|---|
255 | |
112 | |
92 | |
48 | |
38 |