Combine list

Hey.
I want to make a new list.
First of all, the decimals from the “String from object” node, i want them gone.
I tried so split string, but that dosent work.
Second, i want to combine two lists by index. With the lists of names i left bottom corner.
Third, i want a text between the number and the name.
The result should be something like “1 stk. af Badekar” from both list index 0.

Nichlas

I would probably just do like so… without using the “string from object” node…
image
If you’re outputting doubles however it would look like this:


And if you want it can be further simplified:
image

The reason your string split isn’t working is that the separater0 input is supposed to be what character you want to separate by, in this case the “,”. See below:

There was something I was curious with String.Remove. It’s help text says that count by default will remove everything after the index but the node will not function unless a number is put in.

removeString
removeStringscript

It does work when put into codeblock… quite curious :stuck_out_tongue: Can you answer if this is a bug @jacob.small?

Thanks it’s worked. :slight_smile:

@Jonathan.Olesen - Definitely buggy as the design script method clears the rest of the characters while the node version doesn’t. Feel free to make a GitHub bug report. If I don’t see one before I finish my current task (sometime Sunday evening) I’ll pick it up.

Good catch. :smiley:

Hi @jacob.small
Sorry for the delay, have been away all weekend :slight_smile:
I’ve submitted the bug on github :slight_smile:
https://github.com/DynamoDS/Dynamo/issues/9196

1 Like