I have built a page to edit my sharepoint site. I have an edit form created to facilitate this. The form's "Default Mode" is set to "FormMode.Edit" and the "Item" is set to "Gallery2.Selected". When I press my button to edit the entry it pulls all the data for that sharepoint line item. I can edit it, submit it, and the sharepoint gets updated. The issue is if I select the edit button to make another edit the form is empty and I can't make a second edit without refreshing the whole page.
Any ideas would be greatly appreciated.
Solved! Go to Solution.
This is not making sense.
1)
You stated - "When I press my button to edit the entry it pulls all the data for that sharepoint line item"
Are you stating that you are in no other way populating your form, you are just selecting an item in the gallery, which then shows the record in the form and then you use the button to submit?
2) When you say your "SharePoint Page Name" do you mean this to be your List name?
Either way...if I read between the lines of what you are stating, then the real issue is your formula on the button.
First, you should never issue another action after your SubmitForm - for two reasons 1) how do you know the submit was a success and 2) the form may not be completed submitting yet...so you will wipe out the data.
However, the real clue is that you are issuing a NewForm function. This will put the form in New mode and it will ignore your Item property...and thus no data.
So, get rid of the NewForm function in your formula.
You don't need the ResetForm function you have sprinkled into the other actions - that is only resetting the form back to the default mode (Edit) which is why you think it is working. But, the reality is, you don't need it, you just need to get rid of the NewForm function.
What is the formula on your Edit button and what is the Formula on the Items property of your gallery?
The edit button "OnSelect" is set to "SubmitForm(Form4); NewForm(Form4)". The "Items" property is set to my sharepoint page name.
Thanks for the reply
I figured it out I believe. I updated the for OnSuccess, OnReset, and OnFailure to be "ResetForm(Form4)"
This is not making sense.
1)
You stated - "When I press my button to edit the entry it pulls all the data for that sharepoint line item"
Are you stating that you are in no other way populating your form, you are just selecting an item in the gallery, which then shows the record in the form and then you use the button to submit?
2) When you say your "SharePoint Page Name" do you mean this to be your List name?
Either way...if I read between the lines of what you are stating, then the real issue is your formula on the button.
First, you should never issue another action after your SubmitForm - for two reasons 1) how do you know the submit was a success and 2) the form may not be completed submitting yet...so you will wipe out the data.
However, the real clue is that you are issuing a NewForm function. This will put the form in New mode and it will ignore your Item property...and thus no data.
So, get rid of the NewForm function in your formula.
You don't need the ResetForm function you have sprinkled into the other actions - that is only resetting the form back to the default mode (Edit) which is why you think it is working. But, the reality is, you don't need it, you just need to get rid of the NewForm function.
Ah excellent a cleaner way. Thank you! that worked. Sorry if I wasn't super clear. Fairly new to this whole thing.
No problem. Glad it helped.
No problem. Glad it helped.
User | Count |
---|---|
252 | |
107 | |
89 | |
51 | |
44 |