andrea.ong
(Andrea Ong)
January 25, 2022, 1:17pm
1
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
However, the IF statement is not running
What might be the issue please?
Yoichi
(Yoichi)
January 25, 2022, 1:23pm
2
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,
andrea.ong
(Andrea Ong)
January 25, 2022, 1:38pm
3
Hi @Yoichi , yes both matches
What shall I do now?
Yoichi
(Yoichi)
January 25, 2022, 1:49pm
4
Hi,
Can you check this If flows to Then or Else using ExecutionTrail or LogActivities with Debug mode?
Regards,
andrea.ong
(Andrea Ong)
January 25, 2022, 2:03pm
5
For some reason I cannot press that button
@Yoichi
Yoichi
(Yoichi)
January 25, 2022, 2:06pm
6
Hi,
We need to press these button before Run. So can you stop the process and click button, then run debug mode?
Regards,
andrea.ong
(Andrea Ong)
January 25, 2022, 2:08pm
7
Found it! Here you go:
The else executes even though Finland exists in the dictionary. @Yoichi
Yoichi
(Yoichi)
January 25, 2022, 2:15pm
8
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,
Yoichi
(Yoichi)
January 25, 2022, 2:32pm
10
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,
Yoichi
(Yoichi)
January 25, 2022, 2:46pm
12
Hi,
Probably, the following (red arrow) Assign activity re-initilaize the dictionary. So can you try to remove this Assign?
Regards,
andrea.ong
(Andrea Ong)
January 25, 2022, 2:51pm
13
Ok, now we’re able to see the 35 keys
However, it is still not identifying ‘Finland’ @Yoichi
Yoichi
(Yoichi)
January 25, 2022, 2:54pm
14
Hi,
Can you expand >
mark of Keys or RawView, then Check “Finland” exists correctly?
Regards,
Yoichi
(Yoichi)
January 25, 2022, 2:57pm
16
Hi,
Can you also expand RawView?
Regards,
Yoichi
(Yoichi)
January 25, 2022, 3:06pm
18
Hi,
We can check each items of Keys as the following. Can you check "Finland exists correctly in your keys of the dictionary?
Regards,
Yoichi
(Yoichi)
January 25, 2022, 3:12pm
20
Hi,
Alright, can you try to click the following (red arrowed) icon, then check it in Local Value window?
Regards,