How to write multiple value in Assets

Hey everyone I am using Microsoft Office365 activity to send email. The recipient needs to be a string array. At present the 2 email address is separated by semicolon in asset and I entered {config(“Asset”).tostring} in input for recipient of Office 365 send email activity and I’m getting an error saying the recipient is invalid. My question is how can I write multiple email address in Asset, so that I won’t get this error?

Regards
Anived

HI,

Can you try Split method as the following, for example?

strAsset.Split(";"c)

If there is extra space before or after mail address, the following might be better.

strAsset.Split(";"c).Select(Function(s) s.Trim()).ToArray()

Regards,

2 Likes

Hello @Anived_Mishra ,

In the config file under Asset sheet define your Asset Reference Name (Ex : Email_ToAddress) and this Name you need to use in your workflow in To field of Send email activity as : Config(“Email_ToAddress”).ToString, under value section of same row in asset sheet define your asset name and this asset you will be creating in your Orchestrator (Ex : ProcessName_EmailToAddress). While creating asset give its type as text and define values as comma separated one (ex : Abc@gmail.com;Def@gmail.com).

Regards,
Rohith

1 Like

Hey, I was able to use it after splitting. Thank you :slight_smile:

1 Like

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