REFramework Config file - a question

Wondering if there is any specific reason why Config file is read into a Dictionary of <string,object> and not <string,string>… depending on the type of arguments, CType will be used (e.g. TimeoutShort) subsequently.

Regards, Udayan

Fine the reason why we use DICTIONARY for config file is that we can access the value of the excel columns NAME and VALUES as KEYS and VALUES of a dictionary at any place within the REFramework…you may even ask why can’t we use excel to get the value and use it…but we have different sheets and all the names and values column in those sheets are consolidated together to a dictionary as key value pair
–next

DICTIONARY (string,string) or DICTIONARY(string,object) both are same and the reason is some time the value of a key might be in integer and we cannot access it if its a (string,string) so we are mentioning as (string,object) which can accept any value of any type being as an object

hope this would help you
kindly correct me if i have understood the query wrongly
Cheers @Udayan

@Palaniyappan

Thanks Palani! I will get back :slight_smile:

Sure
Cheers @Udayan

Hi, I am trying to use the config file to retrieve an integer but when I use Config(“delayShirt”) to get the value of the integer it is not working how should I use it?
I am using Config(“Name”).tostring for strings

I tried Convert.ToInt16(Out_Config(“delayShort”)) but still did not work

Kindly Try with Convert.ToInt32(yourvariable)

Cheers @Rasoul

Thank you for replying,

It is not working, here is what I am doing

I have a config file that has a variable “url” and “shortDelay”
my dictionary is called Out_Config

When I use Out_Config(“url”) in the open browser as a variable it works fine

when I use Convert.ToInt32(Config(“shortDelay”)) in the timeout field of an activity it does not work

I tried assigning it to a variable it did not work also

Sorry for bringing this back up, but i have a followup question for the string,object answer.

When trying to get something back from the dictionary you have to do a conversion anyway, and since most of the time we use strings (subjective assumption), wouldn’t is save time and readability to use a <string,string> instead of <string,object>?

This would eliminate the need for typing “.toString” after every dictionary pull, and instead only need to use it when pushing a non-string object to the dictionary.

Is there something scenario i haven’t thought of?

I’m interested in the communities response to this, as i’m making my own framework that is a lot simpler to understand for new people than UiPaths :slight_smile: