cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
golabem
Level: Powered On

Saving entered records from collection to each unique submitted form on sharepoint

Hello,

 

Do you know how to save populated field values from entered collection in each unique submitted sharepoint form?

I mean, I have a form which is working well, but below form I have collection which calculates entered data (picture in attachment - I can add as many rows as I want by clicking add button).

 

When I type some data in the collection fields, and submit form, it is becoming applied to all my submitted forms on my sharepoint list, don't know why. Becouse the number of rows, and values inside can be diffrent, I want to make it unique for each submitted form.

I hope I explained it enought clearly, thank you for all your help

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Saving entered records from collection to each unique submitted form on sharepoint

Hi @golabem ,

Do you mean that every item's form display the same data?

Since all your data is saved to the same collection, so every item's form will display the same data.

 

I suggest you update collection with this item's ID to used for filtering.

Try this:

Collect(TaskInfo, 
    {Name:  Task_Name.Text,
     Role1: Role1_hours.Text,
     Role2: Role2_hours.Text,
     Role3: Role3_hours.Text;
ID:ThisItem.ID} ); Reset(Task_Name); Reset(Role1_hours); Reset(Role2_hours); Reset(Role3_hours);

 

And then, set the gallery's Items (which is used to display collection):

Filter(TaskInfo,ID=ThisItem.ID)

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
Community Support Team
Community Support Team

Re: Saving entered records from collection to each unique submitted form on sharepoint

Hi @golabem ,

Do you mean that if you submit forms, it will update the whole collection to sharepoint list including duplicate value?

Could you show me you formula about updating?

I suggest you filter collection before updating.

For example:

Collect(listname,Filter(collectionname,ID not in listname.ID)) 

 

 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
golabem
Level: Powered On

Re: Saving entered records from collection to each unique submitted form on sharepoint

@v-yutliu-msft 

When i submit one form, entered value in collection starting to be applied to all submited forms.

For example (screenshots per attachments):

I have made form TEST 2 (picture 1) with manually entered values to collection. Then I'm making next form TEST 3 with completly diffrent collection (picture 2), and all my previous forms starting to have same collection (picture 3)

 

Community Support Team
Community Support Team

Re: Saving entered records from collection to each unique submitted form on sharepoint

Hi @golabem ,

Do you mean that you update records by using entered collection?

Could you show me the formulas about

1)how do you create collection?

2)how do you update data?

 

 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
golabem
Level: Powered On

Re: Saving entered records from collection to each unique submitted form on sharepoint

@v-yutliu-msft 

I have some fields which are updating columns in sharepoint list, and besides from that, I want to have this addable list (collection), which is populated manualy and save it together with unique, submitted form. The point is, user should be able to add diffrent amount of rows, depend on his preferences. 

 

1) I'm creating collection by clicking button, which has formula OnSelect:

Collect(TaskInfo, 
    {Name:  Task_Name.Text,
     Role1: Role1_hours.Text,
     Role2: Role2_hours.Text,
     Role3: Role3_hours.Text}
);
Reset(Task_Name);
Reset(Role1_hours);
Reset(Role2_hours);
Reset(Role3_hours);

 

 2) I'm not sure which formula it is. I want to simply save everything. when I click save icon in sharepoint, which I think is connected with SharePointIntegration OnSave (SubmitForm(SharePointForm1); in powerApps.

 

Sorry If I'm not explaining it enought clearly, I really appreciate your help

Community Support Team
Community Support Team

Re: Saving entered records from collection to each unique submitted form on sharepoint

Hi @golabem ,

Do you mean that every item's form display the same data?

Since all your data is saved to the same collection, so every item's form will display the same data.

 

I suggest you update collection with this item's ID to used for filtering.

Try this:

Collect(TaskInfo, 
    {Name:  Task_Name.Text,
     Role1: Role1_hours.Text,
     Role2: Role2_hours.Text,
     Role3: Role3_hours.Text;
ID:ThisItem.ID} ); Reset(Task_Name); Reset(Role1_hours); Reset(Role2_hours); Reset(Role3_hours);

 

And then, set the gallery's Items (which is used to display collection):

Filter(TaskInfo,ID=ThisItem.ID)

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

golabem
Level: Powered On

Re: Saving entered records from collection to each unique submitted form on sharepoint

I dont know why " ThisItem.ID " is not working, but I used your answer with one of my unique variables instead (every form has specified uneditable title, just like ID) and it works perfectly. 

 

Thank you very much, I really appreciate this.

golabem
Level: Powered On

Re: Saving entered records from collection to each unique submitted form on sharepoint

I have another issue about this:

 

It works perfectly, but when I refresh sharepoint list I'm loosing all data entered to collection. Do you know the way to save it pernamently ? Do I need to create another sharepoint list, where data will be saved to columns, and then connect it somehow ? The point is I expect to have a lot of entered rows to each collection (10-15 to each form, +10 forms a day) and I worry about limits.

Helpful resources

Announcements
thirdimage

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors
Users online (6,589)