referring to the upper image, is it possible to reach the green box result with the red box nodes? If not, why? What’s the logic behind?
Thanks in advance
@Carlo_Beltracchi I’ve been wondering about that too! String.Join and String.Concat handles lists different than all the other nodes. We are expecting combined lists as default behavior, Maybe somebody in dev. team have an explanation? @Zach_Kron @Racel_Williams
With that said, the equivalent node to the code block in the green group is the “+” node, and that behaves as you are expecting:
@Einar_Raknes , thanks for your answer. In my opinion the key is the need of adding an empty string inside the string Concat node…maybe this let you get a sort of “empty slot”.
I think it depends from combinator (or function) logic…
Yes I understand how that works. The empty slot makes the String.Join node header grey and that means that the node has turned into a funcition f(x) with the empty slot as a variable x. The input of List.Map is that function f(x) and a list of x values.
I was just wondering why List.Join and List.Concat are not combining the list input as you would expect from experience with other nodes.
Maybe this blog post can give a little help.
String.Concat are based off of the .net class,
string. The .net class has several overloads for both
Depending on what arguments you feed into the nodes, the system makes its best guess as to what you want to happen. The problem is that the UI doesn’t necessarily match what is happening in the backend.
For instance, both the
String.Concat nodes ask for
string in the
string0 input. This tells the user that you need to put in a list of strings. But, in reality you can put a list of strings, a single string, even a multi-dimensional list of strings. The node will make its best guess as to which method to actually call. For instance, if you feed the node a mix of individual strings and lists, the node will call the method that has a list as the parameter and not the one that uses individual strings. The node will never mix and match the method calls. It is too hard to predict that this is what the user wants. We don’t surface each overload node because there are just too many. We tried to pick the one that we thought users would use the most.
Hope this makes sense
Creating a list from two lists with all possible combinations of elements
Very descriptive! Solved my case!