cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dhinesh28R
Post Prodigy
Post Prodigy

Single column values stored in Multiple rows in SharePoint list instead of single row

Hi,

In my app am storing multiple values in multiple rows but its stored in one row.

I need to store in multiple rows.

 

Am using following formula to store a details in List,

Patch(
List,
Defaults(List),
{

Name:Concat(cname.DisplayName,ThisRecord.DisplayName,";"),

Mail:Concat(cname.UserPrincipalName,ThisRecord.UserPrincipalName,";"),

Department:Concat(Dpt.Value,ThisRecord.Value,";"),

Message: Message.Text,

}
)

 

My Splist,

NameMailDepartmentMessage
Suresh;Dani;RajanSuresh@test.com;Dani@test.com;Rajan@test.comJava;. net; AccountsGood work

 

But i need to store a details in Splist Like this following,

NameMailDepartmentMessage
Suresh;Suresh@test.com;JavaGood work
Dani;Dani@test.com;. netGood work
RajanRajan@test.comAccountsGood work

 

How to do a loop in my formula?

I need to store a details in separate row in a List.

 

Thanks,

Dhinesh

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @Dhinesh28R ,

I am, not sure on your data source in relation to the ThisRecord reference, but this is the syntax you need

ForAll(
   cname As aName
   Patch(
      List,
      Defaults(List),
      {
         Name:aName.DisplayName & ";" & ThisRecord.DisplayName,
         Mail:aName.UserPrincipalName & ";" & ThisRecord.UserPrincipalName,
         Department:aName.Dpt.Value & ;" & ThisRecord.Value,
         Message: Message.Text
      }
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

4 REPLIES 4
WarrenBelz
Super User
Super User

Hi @Dhinesh28R ,

I am, not sure on your data source in relation to the ThisRecord reference, but this is the syntax you need

ForAll(
   cname As aName
   Patch(
      List,
      Defaults(List),
      {
         Name:aName.DisplayName & ";" & ThisRecord.DisplayName,
         Mail:aName.UserPrincipalName & ";" & ThisRecord.UserPrincipalName,
         Department:aName.Dpt.Value & ;" & ThisRecord.Value,
         Message: Message.Text
      }
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Hi @WarrenBelz ,

 Its working fine man, But one issue is there.

Because in my formula cname and dpt are different collection.

 

But you're using a 

"Department:aName.Dpt.Value & ;" & ThisRecord.Value" It's getting error.

 

Because of both are different collection.

 

Now i don't store a department value in separate row. this is only one issue.

 

Others are working fine man.

 

Thanks,

Dhinesh

@Dhinesh28R ,

Not sure what else I can suggest - I cannot see your data, but you generally loop through one data source (collection) at a time. Maybe you need to rethink your data structure.

Hi @WarrenBelz ,

 

Okay man, All are working good man.

 

Thanks,

Dhinesh

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,534)