Im getting this error when I run ‘InitAllSettings’ worflow from studio. Can anybody help?
Could you please run the Main xaml file.
Many thanks!! @lakshman
It worked. Can you please help me understand how are we reading data from assets.In “Get Asset value” activity why are we using row(“Asset”).ToString.
First we create asset in Orchestrator and give that asset name in setting and Asset sheet of config file.Bu instead of using that same asset name in “Get Asset value” activity(in InItAllSettings) why are we using row(“Asset”).ToString.
In Settings sheet, there are two columns like Asset and value.
We are reading all asset column values and making dictionary of it.
Then later by using asset name we will read corresponding values of it.
Hi buddy @Farheen_sultana
Let’s go one by one
”Data at the root level is invalid”
— so the issue occurred because we were trying to run the a child xaml being in a project and usually whenever a project is executed the Main xaml only will get executed and rest child xaml will be called from being in main xaml
But here we tried to run the child xaml directly so the variables and arguments that are required for this child xaml are missing which are to be obtained from main or other xaml in main
That’s why buddy
—Fine then using asset, that’s a good question indeed
As you say we can directly use the asset in get asset activity and the reason why we use that is we have used config fil, a excel file with asset sheet having asset names and values
So first we need to get the records of assets sheet and asset column which has the asset name while the value column has again the asset named as value in it.
And we save this in a dictionary variable later.
So when we use row(“Asset”).ToString in a for each row loop that for each row loop will be having a input with datatable obtained from assets sheet…
Which gives us the name of the asset from the config which is what is mentioned in the asset name property in the get asset activity
The reason why we call them from config is that the basic rule of REFramework is that whatever the code development process may be, the data passed and obtained from the process must be made more reliable in way of accessing like in a secured way and in a easier way
That is only those who have the access to project folder or Nugetpkg they can only access the config and make changes
Moreover making changes all the variables is made easier once place at a time
That’s all buddy
Hope this would help you
In Settings sheet, there are two columns like Asset and value.— Do you mean the Asset sheet or Setting sheet…in both we have Name and value columns.That is where I am getting confused…we have Name as column then why row(“Asset”).ToString.
does asset here refers to column name?
Yes buddy exactly
Could you please take screenshots of your config file and show me once.
And also where you wrote Asset name in settings or Asset sheet ?
okay…Got it…we give asset names which we have already created in orchestrator, in asset and value column of asset sheet and by row(“assets”).ToString we get those names and we store that in config dictionary by using assign activity. Is my understanding correct?
And also where you wrote Asset name in settings or Asset sheet ?-- in both
No need to write in both the sheets. Just write in Settings sheet. It’s enough.
In workflow, we will read value like this:
Config(“CredentialsData”).Tostring - It refers to UIDemo_Credentials. I.e This is the asset name in Orchestrator.
Okay…Will try it out!..