cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Attachments aren't saved

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... 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
New Member

Re: Attachments aren't saved

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!

View solution in original post

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: Attachments aren't saved

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)

20190206saveattachmentsp1.png

App Test:

 You can use Submit or one button to save your form.

DataCardValue8.Default= CountA(DataCardValue7.Attachments.Value)

20190206saveattachmentapptest1.jpg

Method 1:

Use Submit Form.

Result Test:

20190206saveattachmentresulttest1.gif

20190206saveattachmentsp2.png

Method2:Use Button.

Add one Button, and Buttton1.OnSelect: Patch('20190206dropdownformmode',Defaults('20190206dropdownformmode'),{CountAttachments:Value(DataCardValue8.Text),Title:DataCardValue5.Text},Form2.Updates)

Result Test:

20190206saveattachmentresulttest2.gif

20190206saveattachmentsp3.png

 

 

Hope this can be helpful.

Best Regards.

Yumia

Highlighted
New Member

Re: Attachments aren't saved

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...

 

 

Highlighted
New Member

Re: Attachments aren't saved

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!

View solution in original post

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,016)