How to assign out_Username and out_Password to Config Dictionary without temporary variables - GetAppCredentials workflow (ReFrameWork)

First method: Assign out_Username and out_Password to Config Dictionary with temporary variables. It’s working.

Second method: Assign out_Username and out_Password to Config Dictionary without temporary variables. I already tried as below, but can’t. Could you help to suggest me, please?
Option Strict On disallows implicit conversions from 'Object' to 'String'.

Invalid L-value expression.


1 Like

Hi @akkapolk

Did you try to remove the whole value and added again?

Hi @aanandsanraj,

Config(“Username”) and Config(“Password”) have no initial value. Just create new.
Please check my expectation above.

“Username” and “Password” should be in the Name column of Config.xlsx file.
Then you can access the values in the studio as , Config(“Username”).ToString.trim same for the password also.

1 Like

what is the type of value in that dictionary
if its object change it to string in the variable panel for that dictionary variable

Cheers @akkapolk

1 Like
  • Remove the Config(“Username”) and Config(“Password”) from the arguments and click ok
  • Create two-variable one as “varUsename” string data type and another one as “varPassword” SecureString data type
  • Add those two variables in arguments value
  • Then use invoke code activity to store the value in config
    Config.Add(“Password”,New System.Net.NetworkCredential(string.Empty, varPassword).Password)
1 Like

@Manish540, understand, but I don’t want to store Username and Password in Config.xlsx.

I store Username and Password (Type: Credential) by Assets in Orchestrator and then this topic is try to get them and set to Config variable in ReFrameWork. First method above is working, but I don’t want temporary variables: TempUsername and TempPassword.

@aanandsanraj, understand, it looks like my first method above but I don’t use the Invoke Code activity.

You have to use invoke code activity to add new dictionary item in existing dictionary.

1 Like

@aanandsanraj, understand this is another solution which is using Invoke Code activity. Please check the first picture above, I’m using Assign activity, the result is same.