Find difference between two strings and batch rename accordingly


Is there a way to make Dynamo ‘find the difference between two strings’ and use the logic to change multiple strings?

For example:

I need to rename 50 viewnames. The logic of renaming changes depending on the project, it might be a prefix, it might be a suffix or just an insert somewhere in the string.

Lets say my old view is called W01, W02 etc. . I want to change this view name slightly, to “Example-W01” and “Example-W02” etc. I know this could be done by adding a prefix. But sometimes its not a prefix but a suffix. “W01-Example” Or even sometimes its an insert like “Wa01”

But to prevent user error i would like to just enter a field “old name”, and a field “new name” for one string, and find the logic of renaming through dynamo.

Below i added an example which i hope clears it up a bit.


I don’t want to make multiple fields for users to fill in like “Prefix, Suffix, Insert”. I want to keep this behind the scenes, so to speak.

Is there a way to determine what happened to the new compared to the old strings and apply this to multiple strings?

Hi @MVE1112 ,

I think it will be very difficult to get it the way you want it now because of the large number of possibilities you are giving the end user:

I think it will be very, very difficult to make this input and logic error-proof, because of the large amount of possibilities you are giving to the end user:

IE: 001-Example, Example-001, 0-Example-01?

I would use the Data-Shapes UI with the Table input (like Excel). Then you can have 2 columns: 1 for the new name and 1 for the old name. Then the End User can just type in and use some basic Excel functionalities to rename the sheets.