Looping through a for each activity and modifying the item before use

In the items some entries maybe 123718246-12 or 232418346-12/23, how can I edit the items with “/”. So if an item has / I want to disregard that and anything that follows so in this case the item should only be 232418346-12 instead of 232418346-12/23.

What would be the best way to do this.

hi,

str your_var = “232418346-12/23”
arr_your_var = your_var.split(“/”)
your_var = arr_your_var(0)

Mark this as solution if this solves your issue

Thanks

4 Likes

@duaine.b

if item has the string value, then you can use if(item.Contains(“/”),item.Substring(0,item.IndexOf(“/”)),item) in the for each activity

cheers

1 Like

thanks for your help this has worked

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