How to clear the dictionary using Clear Dictionary activity

Hi All,

How to clear the dictionary using “Clear Dictionary” Activity?

It needs a VB expression to perform the action. Please help!

@Kirubakaran_Kannan

Hi, this might clear things for you :point_down:

1 Like

I am getting the below error when i tried clear dictionary activity.

1 Like

@Kirubakaran_Kannan

It’s just mismatch of data types… Check the type of your variables…

1 Like

I created my dictionary with the data type as <String, String>

And no data type has been changed during the workflow and trying to clear the dictionary and getting this error now. Is there anything that we can do apart from this

1 Like

@Kirubakaran_Kannan

When you draged and droped the Clear Dictionary Activity, did you set the Tkey and TValue as strings ?

@Kirubakaran_Kannan Can you try to use Invoke method Activity in this way :
Capture

@mz3bel, No i didn’t get that set option while drag and drop

1 Like

@supermanPunch,

Getting this error while trying your solution

image

Hello @Kirubakaran_Kannan,

I hope you have installed Workflow Manager Activities under dependencies :
image

When you drag and drop “Clear Dictionary” into the workflow, it will ask the Key, Value type. Ensure you set this right (based on your original dictionary i’m sure if its String, String or String, Object. You can check this in the Variables Panel)

image

Now pass the dictionary to the said activity. It should work as expected.

Hope this helps. Kudos :slight_smile:

Regards,
Nithin

5 Likes

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