Changing Something in a List<string>

I have converted a csv into a list due to me having to remove first 2 rows of csv.

This is how the list looks like
List(4) { “Num,Env Num,Envelope,Transaction,Lockbox,Date,Time,Batch,Batch Item,Check,Check Amount,ABA/RT,Account Num,Check Num,CreditCardNumber,ExpirationDate,CreditCardAmount,CreditCardResponse,Amount Paid,Facility Code,Account Number,Amount Due,Amount Paid,Invoice Page,Check Image,Envelope Image,Invoice Image”, “1,1,G-8689002,G-8689002,CHI-773244,2/2/2021,12:00,100,1,1,$109.86 ,91306137,105910,2858,$109.86 ,773244,KA0000986976,$109.86 ,$109.86 ,0;1,9,23”, “2,2,G-8689001,G-8689001,CHI-773244,2/2/2021,12:00,300,1,2,$75.00 ,291378693,7423330088,5273,$75.00 ,773244,KA0001016880,$28.95 ,$75.00 ,1;1,33,47”, “3,3,G-86121003,G-8689003,CHI-774544,2/2/2021,12:00,300,2,3,$602.24 ,91306137,138659,3558,$602.24 ,773244,N00000061838,$70.87 ,$602.24 ,2;1,57,71” }

as you can see there are two “amount paid” , how do i change the first “amount paid” or last “amount paid” to “amount paid 2” ?

@Jay_Chacko - One Option would be, Using Regex Replace. you can do Replace as shown below.

Below pattern has been derived assuming the Facility Code will follow after the first Amount Paid.

how to regex replace a List then update the list with new?

@Jay_Chacko - Check this…

let me check on how to update the list

Update: please check this post on how to update the list using regex.

Have a look here:

question is after doing the skip, i need to replace a text inside the list, like above replace one of the “Amount Paid” to “Amount Paid 2”

@Jay_Chacko - Like this…Pass your List variable in the assign activity as shown below…





This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.