I’m having an issue trying to write a dynamic path for the input data in the config file. The file name contains the data of today as yyyyMMdd (Planning 20220505 NA.xlsx). In the config file have written:
“Planning” + DateTime.Now.ToString(“yyyyMMdd”) + “NA.xlsx”
This is not working though.
Thank you for any help.
Welcome to our UiPath community.
Just mention source folder path in Config file.
And then try below expression to read dynamic filename in your code.
You can’t write code in the config file, only string values. What you can do instead is to add a placeholder and then replace it with String.Format(). E.g:
filename = String.Format(in_Config("PlanningFile").ToString, Now.ToString("yyyyMMdd"))
It works just fine with the given solution. Thank you, @ptrobot
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.