How to update config file(Settings sheet) with a new key value pair in the "Process Transaction" state of REFramework?

Hello Team,

I got an interview question to update the config file with a new key value pair in settings sheet at the process transaction state of the REFramework.
I used the method like below:

  1. Added a new item to config dictionary
  2. Build a new data table
  3. for each item in config dictionary - > added that Key value pair to a data row in the new data table using Add Data row activity

image
4. Once it added all the data from Config dictionary to New data table, I just written that data table to Config Excel file using Write Rage workbook activity.

So it added the new key value pair to config file(settings sheet). I just want to know is there any other easy method for updating the config file(Settings Sheet) with a new key value pair data in process transaction state?

Happy Automation!!
Thanks

Hi @neethu.krishnan6 ,

To simply add a key-value pair to the Config dictionary, you can use an Assign activity. For example:

  • Assign: in_Config("NewKey") = "NewValue"

This will add the key "NewKey" with the value "NewValue" to the Config dictionary.

Yes, that’s right, so how we will update the excel file with new value.?

You can use the Append Range activity to directly update the Excel file with the modified data, avoiding the need to read and rewrite the entire data. However, note that while the values will be updated in the Excel file, they won’t automatically be reflected in the Config variable unless you explicitly add the value.

Yes . That’s right. No need to iterate through all the data and rewrite it again. Thank you Varsha for your suggestion.

1 Like

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