Error while getting asset details ReFramework UiPath

Hi Community,

I have assigned two asset values in re framework config file… now I try to retrieve in InitAllSettings.xaml … First value in asset sheet I successfully got… but when fetching the second value it gives error… can anyone help?
help


Hi @ch460960

Try giving below way:

Config("fastEnvironmentType").ToString

Hope it helps!!

Hi @ch460960 ,

Could you maybe whether spaces or New Lines are present in the values in the Excel sheet ?

in such scenarios we would:

  • checking the Excel, that there is no space after the name within the Cell (A4)
  • Debugging
  • when it fails, checking the dictionary within the immediate panel:

Understanding the 6 Debugging Panels of UiPath in the easiest way possible! - News / Tutorials - UiPath Community Forum

For analysis we can use statements like:

myDictVar
myDictVar.Keys
myDictVar.ContainsKey(“KeyName”)

There is no Config variable… Out_Config avaliable in InitAllSettings

I remove whitespaces still same error

@ch460960

may be any spaces present in the value given in excel

or
change once value u given in excel

``Config("fastEnvironmentType").ToString`
`

or

Config("fastEnvironmentType"").ToString.Trim

cheerss…!

It’s giving same error given key fastEnvironmentType is not present in excel

@ppr I tried with immediate panel when I give out_config(“fastLoginUsername”).ToString it gives value … but while giving
out_config(“fastEnvironmentType”).ToString it gives error… I remove whitespace from excel sheet

show us the output of out_config.Keys thanks

@ch460960

may be any spaces present in the value given in excel

or
change once value u given in excel

``Config("fastEnvironmentType").ToString`
`

or

Config("fastEnvironmentType"").ToString.Trim

cheerss…!

hope its works !

check weather its having spaces or not in exact name

@ch460960

hope its works !

check weather its having spaces or not in exact name

@ppr It does not able to read fastEnvironment… but do not understand why?


now we would recommend stepwise / breakpoint hopping oriented debugging and tracing the flow.

A first inspection would also be the result, when reading in the config excel and checking the resulting DataTable

@ppr in dt_Assets it can succesfully shown

It is better to have reduced ping-pong communication and a more active informative report style

so when it is within the datatable, just continue the debugging and inspect the asset value retrieval part. trace and follow that the asset name is used for the retrieval, the value is received and correctly stored within the config dictionary.

I understood why I can’t able to read…I have placed assigns inside the initallsetting xaml

I Place them outside … it’s working

perfect, so the topic can be closed
Forum FAQ - How to mark a post as a solution - News / Tutorials - UiPath Community Forum

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.