cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Splitting a Variable with Multiple Rows of Data and Populating SharePoint List Columns

I have found several posts, blogs, and videos that show me how to separate data when there is only one row of data, but I have multiple rows of data that I need to separate. My app populates a plain text multi-line text column in a SharePoint list with the data that was inputted in a repeating table:

Master List item ID; Repeating Table ID; User Name; User Email; User License Type

Because it's a repeating table, there will be more than one entry. My data comes over looking like this:

368;1;Bob Smith;Bob.Smith@test.com;Team;|368;2;Sue Jones;Sue.Jones@test.com;Expert;|

I was able to successfully build a flow that would take one row of data (368;1;Bob Smith;Bob.Smith@test.com;Team;) and populate my columns, but I can't seem to figure out the array and expression for multiple rows. I get the following error:

InvalidTemplate. Unable to process template language expressions in action 'Compose' inputs at line '1' and column '2837': 'The template language function 'split' expects its first parameter to be of type string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#split for usage details.'

The flow needs to loop at the "|", create a new row in my list, and populate the columns. I feel like I'm close, but I'm obviously missing something. I found a couple of blogs that confuse me. I've tried some different expressions in my first Compose action, but neither work:

split(first(split(triggerBody()?['{UserInfo}'],'|')),';')
split(first(split(items('Apply_to_each')?['UserInfo'],'|')),';')

My flow looks like this:

 

1.

1.PNG

 

2.

2.PNG

 

3.

3.PNG

 

4.

4.PNG

And I have a warning from my flow that this setup could result in an infinite loop, so I need to figure out how to fix that. In order to prevent a loop in a different workflow, I had to add a flag. That can get complicated with an index and telling the flow to set the flag and then check to see if the flag is set in order to not enter the loop. Is there a better way?

Any help on splitting my variable and creating new rows without creating an infinite loop would be huge.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Helper II
Helper II

Re: Splitting a Variable with Multiple Rows of Data and Populating SharePoint List Columns

I posted it over in Power Automate and got a solution over there.

View solution in original post

1 REPLY 1
Highlighted
Helper II
Helper II

Re: Splitting a Variable with Multiple Rows of Data and Populating SharePoint List Columns

I posted it over in Power Automate and got a solution over there.

View solution in original post

Helpful resources

Announcements
secondImage

August 2020 CYST Winners!

Check out the winners of the recent 'Can You Solve These?' community challenge!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Top Kudoed Authors
Users online (4,215)