Setting Title on Sheet Based on Multiple Replacement Terms

I’m trying to set the Title on Sheet for some views and have the initial set itself working but I’d like to be able to replace multiple strings and can’t quite figure it out. The graph I have at the moment renames based on the first replacement, but if I try and add a second string to replace it seems to ignore the first search term. I tried taking the output from the Element.SetParameter node to feed into a second node, as well as a Passthrough but neither quite worked.

Example:
View Name: Marketing-HCStudio 2
Replacement: HCStudio 2
Replacement 2: HC Studio 2

I replaced Marketing- with nothing “”, then want to add a space after HC.

Right now you’re replacing both strings separately (and setting the title twice.) You need to replace the first item then use that output to replace the second item.

That’s what I thought I was doing by lacing the first SetParameter node into the second… Where should I be looking to pull that output?

You only want to run SetParameter once. You need to string together your String.Replace nodes so that you have the correct string by the time you use SetParameter.

Just like you show here…

Start with View Name, use String.Replace to get Replacement, then use String.Replace on Replacement to get Replacement 2.

2 Likes

This is whats Nick is saying.

1 Like

I figured it was something simple like that… Thanks :beers:

1 Like