cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Nikhil2
Level 8

Save multiple values

Hello Team,

 

Here i have a small issue with the datacardvalues, i have used the datacard values from the sharepoint multiple datacards. But when i try to save i can save only one record even when i have entered the mulitple records.

 

1. I have selected the fields from sharepoint(Same fields thrice) becuse i want to use the same fields but the values inside when i enter into the textbox will be different(Sometimes) or the same value.

2. Now i need to know if i can save multiple records.

 

What i am looking is what kind of code will fit in to excecute the multiple record save on save button? 

 

Moreover below picture will give you more idea of what i am searching for.

 

Capture28.PNG

 

Thanks and Regards,

Nikhil

2 ACCEPTED SOLUTIONS

Accepted Solutions
Community Support Team
Community Support Team

Re: Save multiple values

Could you please explain a bit for the controls used in your example?

 

Are you using form control to enter multiple records, or the seperated field controls?

 

To submit multiple record, we could take use of the forall() and the Patch function together, but first we need to collect the multiple records into a collection.

 

With the collection, the formula to save should be:

Forall(Collection, 
patch(DataSource,
Defaults(DataSource),
{RecordElements})
)

Regards,

Michael

Community Support Team _ Michael Shao
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

Nikhil2
Level 8

Re: Save multiple values

I could use forall command and patch but the problem is here , I am receiving error on patch function when I enter {record elements}. Could you please help me out how should I define the record elements. In my case I have first column in SharePoint list "Project identity no" second column "Name of Project Manager" all column names with space in between and third column "Actual h/month" and lastly and finally fourth column "Cost type". Perhaps I have same way with different lists with different column names but the idea is the same for all.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Re: Save multiple values

I also struggle with such problem! MicrosoftTeam can you help us?

Community Support Team
Community Support Team

Re: Save multiple values

Could you please explain a bit for the controls used in your example?

 

Are you using form control to enter multiple records, or the seperated field controls?

 

To submit multiple record, we could take use of the forall() and the Patch function together, but first we need to collect the multiple records into a collection.

 

With the collection, the formula to save should be:

Forall(Collection, 
patch(DataSource,
Defaults(DataSource),
{RecordElements})
)

Regards,

Michael

Community Support Team _ Michael Shao
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

Nikhil2
Level 8

Re: Save multiple values

Hello Team, 

 

Foremost thank you for the reply!

 

Here i have a form which has the multiple rows as you could see, but the lack is from the same form i am duplicating the fields becuase if i want to enter the multiple entries instead of clicking on save and waiting for the initial field refresh i want to add the multiple rows with same fields. 

 

When i make an entry over multiple rows the values should save on the sharepoint list, but current scenario is i could save only one row values out three. Although i am using different form with same fields, but i need the fields from same form and save in the list all row values not just one row value.

 

Thanks in advance and appreciated !

Nikhil2
Level 8

Re: Save multiple values

I could use forall command and patch but the problem is here , I am receiving error on patch function when I enter {record elements}. Could you please help me out how should I define the record elements. In my case I have first column in SharePoint list "Project identity no" second column "Name of Project Manager" all column names with space in between and third column "Actual h/month" and lastly and finally fourth column "Cost type". Perhaps I have same way with different lists with different column names but the idea is the same for all.

View solution in original post

Nikhil2
Level 8

Re: Save multiple values

Hello,

 

Greetings for the day!

 

Thank you for the sugesstion i had to take reference of your code and implement as the request was from the team end.

 

Appreciated and Thank you !

 

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (3,689)