Dictionary does not recognise Key even though it is unique

This is my dictionary:

RegionDict = new Dictionary(Of String, String) from {{“Denmark”, “Nordics”}, {“Norway”, “Nordics”}, {“Finland”, “Nordics”}, {“Iceland”, “Nordics”}}

The variable was accurately passed as “Finland” as printed out here
image

However, the IF statement is not running

What might be the issue please?

Hi,

For now, can you try to compare them using the following expression?

String.Join(",",PlaceOfReq.Select(function(x) ascw(x).ToString).ToArray)

and

String.Join(",","Finland".Select(function(x) ascw(x).ToString).ToArray)

This returns 70,105,110,108,97,110,100

Regards,

Hi @Yoichi, yes both matches
image

What shall I do now?

Hi,

Can you check this If flows to Then or Else using ExecutionTrail or LogActivities with Debug mode?

Regards,

For some reason I cannot press that button


@Yoichi

Hi,

We need to press these button before Run. So can you stop the process and click button, then run debug mode?

Regards,

Found it! Here you go:
image

The else executes even though Finland exists in the dictionary. @Yoichi

Hi,

Can you set Breakpoint at the If activity and run debug?
Workflow will stop there, then check content of RegionDict at Local panel?

Regards,

Here you go @Yoichi

Hi,

This shows your dictionary RegionDict is empty. Can you check where key and value is input to this dictionary? And also check not missing them in the process?

Regards,

Here @Yoichi

Hi,

Probably, the following (red arrow) Assign activity re-initilaize the dictionary. So can you try to remove this Assign?

Regards,

Ok, now we’re able to see the 35 keys

However, it is still not identifying ‘Finland’ @Yoichi

Hi,

Can you expand >mark of Keys or RawView, then Check “Finland” exists correctly?

image

Regards,


@Yoichi

Hi,

Can you also expand RawView?

Regards,


@Yoichi

Hi,

We can check each items of Keys as the following. Can you check "Finland exists correctly in your keys of the dictionary?

img20220125-a5

Regards,

Sadly this is my view


@Yoichi

Hi,

Alright, can you try to click the following (red arrowed) icon, then check it in Local Value window?

Regards,