cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dauren08
Helper I
Helper I

Save attachments in a share point list from another list

Hello everyone, 

 

I have a question about sharepoint. 

I want to select attachments using a dropdown on the sharepoint list and save these selected attachments to this sharepoint list from another SP list. 

The question is, whether it is possible to do and if it is possible, how than could I do it?

 

Ragards

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @Dauren08 ,

 

Could you tell me:

  1. Do you have a list with many records? Does each record have (0-N) attachments?
  2. Do you want to use a combo box control to display all the attachments in the list?
  3. Do you want to use a button control to create a new record in another list?
  4. Are the attachments in the newly created record the attachments selected in the combo box control?(For example: Suppose you select attachment A and attachment B in the combo box control and click the button control. Do you want to create a new record in list b including these two attachments? )

 

If my assumptions are correct, please refer to the steps below:

1\ This is my list ‘LIST78’. It stores some records with attachments.

v-xiaochen-msft_0-1614232048756.png

 

v-xiaochen-msft_1-1614232048767.png

 

v-xiaochen-msft_2-1614232048772.png

 

 

2\ This is ‘LIST80’ . It is used to store attachments from ‘LIST78’

v-xiaochen-msft_3-1614232048784.png

 

.

3\ Add a button control and set its onselect property to:

ClearCollect(Test,0);ClearCollect(Test2,Filter(Ungroup(ForAll(Sequence(CountRows(LIST78)),Collect(Test,Last(Test).Value+1);Last(FirstN(LIST78,Last(Test).Value)).Attachments),"Value"),!IsBlank(Id)))

 

4\ Add a combo box control ‘ComboBox1’ and set its Items property to:

Test2

 

5\ Set the combo box control’s onchange property to:

ClearCollect(Test3,ComboBox1.SelectedItems)

 

6\ Add a edit form control ‘Form3’ and set its DataSource property to:

LIST80

 

Set this form’s field like picture:

v-xiaochen-msft_4-1614232048788.png

 

 

Set the attachments datacard’s control’s property like picture:

v-xiaochen-msft_5-1614232048809.png

 

 

Set ‘Form3’ ‘s Visible property to:

False

 

7\ Add a button control and set its onselect property to:

Patch(LIST80,Defaults(LIST80),{Title:"3"},Form3.Updates)

 

8\ The result is as follows:

v-xiaochen-msft_6-1614232048811.png

 

v-xiaochen-msft_7-1614232048813.png

 

 

Best Regards,

Wearsky

If my post helps, then please consider Accept it as the solution to help others. Thanks.

View solution in original post

1 REPLY 1
v-xiaochen-msft
Community Support
Community Support

Hi @Dauren08 ,

 

Could you tell me:

  1. Do you have a list with many records? Does each record have (0-N) attachments?
  2. Do you want to use a combo box control to display all the attachments in the list?
  3. Do you want to use a button control to create a new record in another list?
  4. Are the attachments in the newly created record the attachments selected in the combo box control?(For example: Suppose you select attachment A and attachment B in the combo box control and click the button control. Do you want to create a new record in list b including these two attachments? )

 

If my assumptions are correct, please refer to the steps below:

1\ This is my list ‘LIST78’. It stores some records with attachments.

v-xiaochen-msft_0-1614232048756.png

 

v-xiaochen-msft_1-1614232048767.png

 

v-xiaochen-msft_2-1614232048772.png

 

 

2\ This is ‘LIST80’ . It is used to store attachments from ‘LIST78’

v-xiaochen-msft_3-1614232048784.png

 

.

3\ Add a button control and set its onselect property to:

ClearCollect(Test,0);ClearCollect(Test2,Filter(Ungroup(ForAll(Sequence(CountRows(LIST78)),Collect(Test,Last(Test).Value+1);Last(FirstN(LIST78,Last(Test).Value)).Attachments),"Value"),!IsBlank(Id)))

 

4\ Add a combo box control ‘ComboBox1’ and set its Items property to:

Test2

 

5\ Set the combo box control’s onchange property to:

ClearCollect(Test3,ComboBox1.SelectedItems)

 

6\ Add a edit form control ‘Form3’ and set its DataSource property to:

LIST80

 

Set this form’s field like picture:

v-xiaochen-msft_4-1614232048788.png

 

 

Set the attachments datacard’s control’s property like picture:

v-xiaochen-msft_5-1614232048809.png

 

 

Set ‘Form3’ ‘s Visible property to:

False

 

7\ Add a button control and set its onselect property to:

Patch(LIST80,Defaults(LIST80),{Title:"3"},Form3.Updates)

 

8\ The result is as follows:

v-xiaochen-msft_6-1614232048811.png

 

v-xiaochen-msft_7-1614232048813.png

 

 

Best Regards,

Wearsky

If my post helps, then please consider Accept it as the solution to help others. Thanks.

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (71,634)