Question

Is it possible to update dictionary key-value pairs (add/remove) from custom package UI while in development?

  • 18 January 2022
  • 8 replies
  • 23 views

Example: Click a ui button to load key-value pairs and put them into selected dictionary so they are visible in AA during development.


8 replies

Badge +4

@Rafał Belcyr​  Yes.

Input of type: ENTRYLIST with key and value columns.

Output of type: DictionaryValue

 

Entrylist will allow you to add remove entries and is visible on UI.

I don't see a way to do that using entrylists. My goal was to create/update dictionary while in control room during development.

 

Can I get some more info how to use that entry list?

Manually yes. But if there's like 50 or 100 of those key-value pairs I don't want to do it manually and I want them to be visible in CR during development,

Badge +4

@Rafał Belcyr​ You don't need to use custom package for that.

You could just make dictionary as input, when you run this task It will prompt you to provide key value pairs.

Badge +4

Too see dictionary values:

Use debug mode to see existing key value pairs during development.

 

To update/create few values you could use put value action.

-------------------------------------------------------------------

If you are into custom packages and want to update multiple value at once and not repeat put command, You can do so:

 

Input1: Dictionary (to which values have to be added/updated)

Input2 :Entry List or Dictionary (this will allow you to add multiple key value pairs from UI)

result_dictionary 

Output: new DictionaryValue (Input1+Input2)

"Too see dictionary values:

Use debug mode to see existing key value pairs during development.

 

To update/create few values you could use put value action."

 

This is not the thing I want to achieve.

 

 

"If you are into custom packages and want to update multiple value at once and not repeat put command, You can do so:

 

Input1: Dictionary (to which values have to be added/updated)

Input2 :Entry List or Dictionary (this will allow you to add multiple key value pairs from UI)

result_dictionary" data-fileid="0692t000009lBOsAAM 

Output: new DictionaryValue (Input1+Input2)"

 

That's still manual input. I don't want to enter anything manually. I want to have a function in UI which would have an option to select a file and while in UI (in control room, developing code) it would create/update dictionary with key-value pairs from that file. There would be no bot run at all.

Badge +4

You can't directly load from file into dictionary from UI with current features.

 

You could try below steps, this requires to run bot(most probably you will have to run the bot to test anyways):

  • You could save your key value pair in a CSV or a format that can be directly edited from control room.
  • With Package SDK you should be able to then convert that file into dictionary while execution without manual entry.

 

excel-dictionary

You may try to remove old kay/value and use put to insert new one.

Reply