When invoking the process and retrieving the asset from the config file within the REFramework, you can follow these steps to access the asset and work with the array of values:
In your Config.xlsx file (or wherever you store your configuration settings), create a new sheet named “Assets” (if it doesn’t exist already).
In the “Assets” sheet, enter the asset name in the first column (e.g., “AssetName”) and the array of values in the second column. Each value should be separated by a comma.
In the REFramework, locate the “Get Asset” state in the Init state or any other appropriate location where you want to retrieve the asset.
Add an “Assign” activity after the “Get Asset” state to extract the array of values from the asset.Assign: assetArray = config("AssetName").ToString().Split(","c)Here, assetArray is a variable of type Array of String that will store the individual values from the asset.
You can now access each value of the asset by indexing the assetArray variable. For example, to retrieve the first value, use assetArray(0). To retrieve the second value, use assetArray(1), and so on.Example: internalStatus = assetArray(0)Here, internalStatus is a variable that will store the value of the first element in the asset array.
Drag and drop an “Assign” activity to your workflow.
Create a string variable to store the asset value, for example, assetValue.
Assign the asset value to the variable using the Get Asset activity. Provide the asset name and assign the output to assetValue.
Drag and drop another “Assign” activity below the previous one.
Create an array variable to store the split values, for example, splitArray.
Split the assetValue using the desired delimiter using the Split function. Assign the result to splitArray. Assign: splitArray = assetValue.Split(","c) Note: Replace the delimiter “,” with your desired separator.
Now you can use the splitArray variable to access the individual values in your automation workflow.