Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
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.7k points)
0 votes
1 answer
asked Jul 10, 2019 in RPA by Abhishek_31 (12.7k points)
0 votes
1 answer
asked Jul 4, 2019 in RPA by Abhishek_31 (12.7k points)

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...