How do I create a dynamic asset in Orchestrator that looks for an .xlsx file

The scenario is this in development I have an excel application scope file that is hard coded right now for testing but when I move this file the naming could change, is it possible to create an asset to look for an .xlsx file using an asset. How would I do this to avoid issues with naming of the file?

image

Hello @jeff.shubzda ,

You can create an Asset in orchestrator with type as string and keep the name of your excel as the value.

Then in the workflow you can Get Asset activity and use that variable in the Excel Application scope.

So whenever if you want to change the path, you can change in the Orchestrator Asset.

https://docs.uipath.com/activities/docs/get-robot-asset

There is no such thing as a dynamic asset.

If you want to process files without knowing the name, use Directory.GetFiles

Hi @jeff.shubzda,

Ok there are layers to this question.

  1. You will need to make a new string asset in orchestrator
  2. Assets in orchestrator allow for both set and get methods
  3. If your target excel file name is dynamic, your robot code has to ensure that it sets the asset value according for every run
  4. Robot retrieves the new asset value from orchestrator and passes it on to your Excel Application Scope

This way you can update the location and file name of the excel in the Excel Application Scope.

An example:

  1. Creating a string Asset Named ExcelFilePath with dummy value xyz
  2. The robot starts processing
  3. The file name of excel is known to the robot after some processing (I do not know how you get your new excel file during your process)
  4. Robot Sets the new value of the Asset ExcelFilePath = files\TIN 23-2380812.xlsx
  5. Robot later using the Get Asset activity and save the value in a variable lets call it ExcelFilePath
  6. The saved variable ExcelFilePath is then

In the next loop the steps are repeated but step 3 and step 4 would be dynamically set.

There’s no point to doing that. Why set the value then get it? If the automation knows the value to set, it can just use it without sticking it into an asset.

You have a point there.

The only thing I can think of is if these are two different processes only then the above approach would make sense. But looking at the question, I dont think he has two processes.

@jeff.shubzda the suggestion from @postwick should be your choice.
There are loads of threads in the forum to get the latest file. An example : How do I open the most recent excel file in a folder

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