Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in RPA by (5.3k points)

While running mail.xaml, how could I find the current running Xaml file name dynamically?

In other words, get the Main.xaml name dynamically in the flow. Is this possible ?

1 Answer

0 votes
by (9.5k points)

This isn't possible

 You can store all the .xaml file paths that you wish to invoke into variables or an array, then you can use that in your Invoke Workflow to call it and you can tell which part of the process you are currently at.

You can also use System.Environment.CurrentDirectory (or Directory.GetCurrentDirectory) and Directory.GetFiles() to gather the .xamls located in the folder. 

And, if your filenames are named where they are in the order of the process, you can store them into a list and use that list in your Invokes.

One more thing is you can get the filename only by using Path.GetFileName(), but requires a full path I think.

 Or you can also use a .Split like filepathvariable.Split("\"c).Last

Related questions

0 votes
1 answer
asked Jul 12, 2019 in RPA by Abhishek_31 (12.8k points)
0 votes
1 answer
asked Jul 10, 2019 in RPA by Abhishek_31 (12.8k points)
0 votes
1 answer
asked Jul 4, 2019 in RPA by Abhishek_31 (12.8k points)
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers

500 comments

94.1k users

Browse Categories

...