Code: Select all
(if(var == null) var = "Hello") == "World"; (var = if(var == null) "Hello") == "World"; (var = convertNull(var, "Hello")) == "World";
You can copy flows.xml to somewhere else and open the xml to see the same blank field. I used exported flow as example, as it is much much shorter.
If you want to protect each branch, where 1 choice is to continue the flow and the other is doing nothing, you should use parallel expression. For splitting trigger, it is recommended to use multiple parallel expression as shown here : viewtopic.php?f=3&t=6985
(It is explanation for FEP and AES, but have screenshot for how to split trigger). Input dialog with single choice also should use this method, as shown in my secure setting logger flow. Of course, this is my flow style, not a fixed guideline. It is up to you to use the method, or modify to suit your own style.
Expression normally branches to 2, true or false. You can add another one by using the exception branch (force error occured). But I usually use the parallel expression above. To stop/branch the flow when particular condition is met, see : viewtopic.php?f=4&t=7639
For Move files, if using list works, then there must some difference in the path defined when using map. Need to see the example of the error. It maybe related to the index problem you mention.
In List, each value is single value
index 0 >>> value1
index 1 >>> value2
index 2 >>> value3
While in map, each pair is a combination of key-value. Where "key" must be single value, and the "value" can be single value or other list/map (nested). You can see map just like dictionary. Where the "key" is the word you search for, and "value" is the translation. (that's why it always comes in pair, word-translation).
When we use getMapKeys(), we create a newList() from the keys, which contain newList("key1", "key2", "key3"). Hence when index is incremented, it increment in this new created list. To get the corresponded value1, we access the map back using map["key1"], which will give value1
index 0 >>> key1 | map["key1"] >>> value1
index 1 >>> key2 | map["key2"] >>> value2
index 2 >>> key3 | map["key3"] >>> value3
That's why for the map style, one of the source/target has longer script, as one is using the index, the other is using the map key. It also explain why we only increment by one, since getMapKeys() only retreive the key.