How to return Dictionary from “Invoke code “ component

Hi All , need help

How to return Dictionary from “Invoke code “ component

wrote the code in "Invoke code " component , I need to reuse this "checkBoxMap" in same sequence

code :

Dim checkBoxMap As New Dictionary(Of String, String)()

checkBoxMap.Add(“To_replace”, “I I To replace”)
checkBoxMap.Add(“Vacant_budgeted”, “I I Vacant budgeted”)
checkBoxMap.Add(“Additional_headcount”, “I I Additional headcount”)
checkBoxMap.Add(“Temporary_services”, “I I Temporary services required”)
checkBoxMap.Add(“Permanent_full-time”, “I I Permanent full-time”)
checkBoxMap.Add(“Permanent_part-time”, “I I Permanent part-time”)
checkBoxMap.Add(“Fixed_term_Of_full-time”, “I I Fixed term of ……. month(s)/year(s) on full-time basis”)
checkBoxMap.Add(“Fixed_term_Of_part-time”, “I I Fixed term of ….… month(s)/year(s) on part-time basis”)
checkBoxMap.Add(“Fixed_term_Of_temporary”, “I I Fixed term of ….… day(s)/week(s)/month(s) on temporary basis”)

Create parameter checkBoxMap Of Dictionary(string, string) and put there variable from sequence. Remove row with dim and
all other can be the same.

Also you can use initialization syntax

checkBoxMap = New Dictionary(Of string,string) {
    {“To_replace”, “I I To replace”},
    {“Vacant_budgeted”, “I I Vacant budgeted”},
  {“Additional_headcount”, “I I Additional headcount”}

Hi Uemoe,

above format using Dim also working , but those values i cannot accessing out side of “Invoke code”,
those values i need to use in other sequence also , for that i need creating OUT argument .

i have created (invoked code arguments ) , out type direction parameter , but how to use that argument ??


in Invoke code


Invoke code arguments

how to use "DictOut " in other sequence or same sequence ??

First create variable in sequence and put it in value of DictOut parameter. You can do it using ctrl+k in this field. Second inside invoke code add row
DictOut = dict

I missed you first picture. You can put InitDictionary in value of DictOut parameter. And after you assigned DictOut in invoke code you can use InitDictionary after invoke code. Mechanics of parameters for invoke code similar to invoke workflow. You can watch some video about it to refresh your knowledge.