Why is it that i can’t print the values of a Collection of Dictionary on any of the print activities? How can i print the values if so?
Thanks
Why is it that i can’t print the values of a Collection of Dictionary on any of the print activities? How can i print the values if so?
Thanks
Hello @Luis_Fernando,
For example, If you read an excel that contains column A: Name of something, and in column B the value of column A. Such as Config.xlsx file from Reframework uipath template.
Then, if you read the sheet, you can do for each row in dt → Assign act: myvar(row("Column A ").ToString) = row(“Column B”).
After that, imagine that in column A in second line there is the word: MyDog
Then in log message use: myvar(“MyDoc”) and the output will be the value in second line in column B
Hi @Luis_Fernando,
There can be many ways to do this. Here is what I usually use.
TestDictionary.Keys
returns array For Each
activityTestDictionary(Key.ToString)
as valueSo the expression would look like this.
"Index value "+Index.ToString+" Key : "+key.ToString+" with value : "+TestDictionary(key.ToString)
This method should work for most native variable types like string, int, datetime, boolean etc. But if your Dictionary holds any custom variable type (for example, UiElement) then you will need to change this approach slightly.
Here is the sample file for you to try:
PrintDictionary.xaml (7.4 KB)
Hope this helps you and others.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.