Hi Community,
i am having an issue. i have an input file which contains 3 rows names.
so all these input data will be processed to queues and call for processing.
so before key in data i will call from queue and having an template in that need to replace with the queue names.
Assign = TestBody.Replace( “@MST-EIP ”, “@”+team_Member1).replace(“/iib-team”, " @“+team_Member2).Replace(”/Member", " @"+ team_Member3).Replace( “Organisation”, Orgnaization).replace(“TeamName”, Team_name).Replace(“Q1”, strQuarter).Replace(“2025”, intYear.ToString)
my query is if the data is available in member1,2,3 can print normally. if any of 3 data is empty it should replace with it empty with out printing @.
can you please suggest how to print..
Thanks
You can easily check if the string is empty before replacing.
Here’s a reference that might help with your query:
myString = If(String.IsNullOrEmpty(myString), myString, myString.Replace(“oldValue”, “newValue”))
chaitanyaKumar:
TestBody.Replace( “@MST-EIP ”, “@”+team_Member1).replace(“/iib-team”, " @“+team_Member2).Replace(”/Member", " @"+ team_Member3).Replace( “Organisation”, Orgnaization).replace(“TeamName”, Team_name).Replace(“Q1”, strQuarter).Replace(“2025”, intYear.ToString)
so you mean to say before this i need to check its team_Member1 Null or empty right. can you please check the assign activity below and suggest where exactly need to check the null or empty.“Team_Member1” i get from queues it its value is there need need to replace or else need to replace empty.
TestBody.Replace( “@MST-EIP ”, “@”+team_Member1).replace(“/iib-team”, " @“+team_Member2).Replace(”/Member", " @"+ team_Member3).Replace( “Organisation”, Orgnaization).replace(“TeamName”, Team_name).Replace(“Q1”, strQuarter).Replace(“2025”, intYear.ToString)
Hi Manas,
so you mean to say before this i need to check its team_Member1 Null or empty right. can you please check the assign activity below and suggest where exactly need to check the null or empty.“Team_Member1” i get from queues it its value is there need need to replace or else need to replace empty.
TestBody.Replace( “@MST-EIP ”, “@”+team_Member1).replace(“/iib-team”, " @“+team_Member2).Replace(”/Member", " @"+ team_Member3).Replace( “Organisation”, Orgnaization).replace(“TeamName”, Team_name).Replace(“Q1”, strQuarter).Replace(“2025”, intYear.ToString)
@chaitanyaKumar
It’s my bad. The solution I shared was only for replacing a single string variable.
I believe the updated solution below will be more helpful for you.
TestBody.Replace(“@MST-EIP ”, “@” & team_Member1) _
.Replace(“/iib-team”, " @" & team_Member2) _
.Replace(If(String.IsNullOrEmpty(team_Member3), “”, “/Member”), If(String.IsNullOrEmpty(team_Member3), “”, “@” & team_Member3)) _
.Replace(“Organisation”, Orgnaization) _
.Replace(“TeamName”, Team_name) _
.Replace(“Q1”, strQuarter) _
.Replace(“2025”, intYear.ToString())
system
(system)
Closed
August 28, 2025, 7:40am
6
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.