How we can replace any blank or special character with NA in queue transaction item


I am fetching a text address(line1, line2, line3). While fetching line3 some times we’ll get value and sometimes not. For Example line3 -------- like this.

Line 1-1234 geneva Street
Line2-rich Market
Line 3- 876 street number, TX

Line 1-1897 Anderson Street
Line2-River side Market
Line 3- -------------------

While adding to the queue how we can replace upper example with NA in transaction item.

1 Like

variable.replace(“target char”, "want to replace ")

example variable= awest


answer = fwest

Hello @mukesh_singh,
From my understanding of your problem,
you could use split activity to divide the address string.

Ex: assign Line3 = Address.Split(Environment.NewLine.ToCharArray)(2)

and then add if statement to check whether — contain or not.

Ex: if statement: Line3.Contian("------") true ==> Line3.Replace("-----","N/A")

or you could use Replace without checking as shown image below=>

I hope I could help you,
happy automation :robot: .

1 Like

Hey @mukesh_singh

You can just perform string replace.


Hope this helps.


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