Hi. I wan to do this.
If match activities output = empty(Null)
-match_output = " "
how can I do that ?
Hi. I wan to do this.
If match activities output = empty(Null)
-match_output = " "
how can I do that ?
Hi @sufyant
use String.IsNullorEmpty(match_output) or string.isNulloremptyWhitespace(match_output)
Thanks
Ashwin S
HI
this can be done with a ASSIGN activity like this
str_output = IF(String.IsNullOrEmpty(str_input.ToString)," ",str_Input.ToString).ToString
Cheers @sufyant
Not working
Buddy how can I write this in ASSIGN Activity
simple buddy
stroutput in TO property and this expression
IF(String.IsNullOrEmpty(str_input.ToString)," ",str_Input.ToString).ToString
in VALUE property of ASSIGN activity
Cheers @sufyant
no its same error
What is the output of Matches
Try to print it
After that ,
Match_Output.Tostring.Trim.Contains(āā)
Buddy I think this is not for me. I am getting e-mail address from e-mail body with match activities. I wan to do this
If in mail body contain e-mail address, mailAddress = mailMatches(0).Value
Else mailAddress = " "
dāyou know what i mean?
Got it
but only for mailMatches(0).Value that is for first match alone or for all matches
@sufyant
just first matches. Because only 1 mail address have in mail
Fine
hope these steps would help you resolve this
āget the output from matches activity with a variable named mailMatches
ānow use FOR EACH activity and pass the variable mailMatches as input and change the type argument as System.Text.RegularExpressions.Match
āinside the loop use a IF condition like this
String.IsNullOrEmpty(item.ToString)
if true it goes to THEN part where use a assign activity like this
mailAddress = " "
or goes to ELSE part where use ASSIGN activity like this
mailAddress = item.ToString
ānext to this IF use a BREAK activity
Cheers @sufyant