|
Post by snowday on May 30, 2023 22:56:14 GMT
Due to the varying size of the numbers and the way the table is setup, there's no way I can use click/drag to send JUST numbers to the clipboard. I had hoped that sending it to an integer variable would clean it uo automatically, but this is not the case.
What I have in the clipboard is basically "$$$$$$_______138,264." Integer will remove the commas but that's all. I was unable to find a command(tbh it would probably take more than one) that would allow me to manipulate a string to get rid of the alpha-characters and spaces that precede the numbers.
|
|
|
Post by philranger on May 31, 2023 0:18:43 GMT
Hello,
MMM isn’t the greatest for string manipulation. I typically pre-clean my data with either Excel or Notepad++
|
|
|
Post by Steve on May 31, 2023 11:18:01 GMT
Hi snowday At the moment working with string manipulation within MMM is pretty much non-existent however it's coming soon. Some inbuilt string manipulation exists within MMM at the moment however, has done for a couple of versions, it's not polished though and clunky so I haven't announced it yet. Are the contents that you bring in from the clipboard predictable in their length and structure? If they are this would work: 1 | RUN ACTION | DEFINE STRING VARIABLE | %MyInput%::$$$$$$_______138,264 2 | RUN ACTION | DEFINE STRING VARIABLE | %FirstList%::%MyInput%::DELIM=_::LIMIT=0 3 | RUN ACTION | DEFINE STRING VARIABLE | %Number%::%FirstList7%::DELIM=,::LIMIT=0 4 | RUN ACTION | MESSAGE PROMPT | %NUMBER% and %NUMBER1%::My Numbers::0::OK At line 1 we define the custom variable. For you this would be input from the clipboard %MyInput%::%CLIPBOARD% At line 2 we create a list variable %FirstList% with the contents of %MyInput% split by the _ delimiter. This will give us 8 list items. %FirstList% through to %FirstList7%. At line 3 we create another list called %Number% with the contents of %FirstList7% (123,264) split with the , delimiter. This gives us two list items, %number% and %number1%. At line 4 we output these two vars with a message prompt. Regards, Steve.
|
|
|
Post by snowday on Jun 13, 2023 18:25:56 GMT
Is DELIM and LIMIT part of that hidden functionality that you haven't really made public yet? I saw no mention of it in turnssoft.com/conditions. What does LIMIT do? Control the maximum number of items in the list?
|
|
|
Post by Steve on Jun 22, 2023 5:27:41 GMT
The limit and delim apply to the list vars and yeah they are in there.
|
|