I have a form with 4 screens, at the last screen I set attachments via a form connected with an item and the attachments control on this.
I have a save button, which should save the attachments to the form. Now this one works only part of the times... So my attachments are stored DataCardValue, so what I did I tried to save my count to a SharePoint list via counting the attachments: CountRows(DataCardValue.Atachments). This functionality also only works when the attachments save button does it's work... The other times it just saves a 0 (when I show this value on the screen, it does show the correct number)...
Not everytime, I'm pulling my hear to solve this one...
Solved! Go to Solution.
I've restructured my code and made sure the attachments are saved and let the user from then on navigate to the next screen (using the error functionality). This seems to work!
Thanks though for the elaborate answer!
Hi @DriesVerdonckt,
Do you want to save the Count Ataachments’ files number to your SP list?
Is CountRows one column in your SP list?
What the formula expression of your save button?
You can use submit form or save button to save attachments and the count number.
I test as next, I think you can try following workaround:
DataSource:
20190206dropdownformmode (My SP list name)
CountAttachments (number type)
App Test:
You can use Submit or one button to save your form.
DataCardValue8.Default= CountA(DataCardValue7.Attachments.Value)
Method 1:
Use Submit Form.
Result Test:
Method2:Use Button.
Add one Button, and Buttton1.OnSelect: Patch('20190206dropdownformmode',Defaults('20190206dropdownformmode'),{CountAttachments:Value(DataCardValue8.Text),Title:DataCardValue5.Text},Form2.Updates)
Result Test:
Hope this can be helpful.
Best Regards.
Yumia
Hi,
Thanks for the answer, what you describes is exactly how I submit my form, the thing is... it only works 50% of the time, the other times it just doesn't do anything...
Counting rows was my idea to check the number of attachment (when the submit wouldn't save my attachments, at least I knew if a user had uploaded attachments and how may). BUT... for the moment I save the number of rows or submit the form with attachments, it seems like the attachmentscontrol (datacardvalueX) is reset and looses its value...
I've restructured my code and made sure the attachments are saved and let the user from then on navigate to the next screen (using the error functionality). This seems to work!
Thanks though for the elaborate answer!
User | Count |
---|---|
142 | |
137 | |
78 | |
77 | |
73 |
User | Count |
---|---|
230 | |
177 | |
68 | |
68 | |
58 |