Read string from asset and Split String

I want to read this string from the asset 21,38,39 and split it with ,

Then I want to type it one by one

HI,

How about the following?

Regards,

1 Like

Hi @Rawan_Ghurab

  • Use the Get Asset activity to retrieve the value of an asset stored in Orchestrator.

  • Specify the name of the asset in the AssetName property and create a variable to store the output in the Value property.

  • Use the Assign activity to split the input string by comma and store it in an array of strings.

  • Use the Split method with a comma as the separator and assign it to a variable of type String.

output = Split(YourAssetOutput,",")
  • You can now use the output array to access each element of the split string by its index.

Example, output(0) will return “21”, output(1) will return “38”, and output(2) will return “39”

Regards
Gokul

1 Like

Hi @Rawan_Ghurab,

  1. Add a “Get Asset” activity to your workflow.
  2. Create a new variable of type String to store the value of the asset. Let’s call it “assetValue”.
  3. Set the “Value” property of the “Assign” activity to the following expression:assetValue = assetValue.Split(","c)
1 Like