How to best control behavior of a workflow based on page name

Hi gang. I have a few workflows in my site header that run unnecessarily on certain pages, something I’d like to stop doing. These workflows don’t really do anything for the user and go unnoticed, but I’d prefer not to have logic running unnecessarily.

Let’s say I have 10 pages on my site. The “magic” workflow in question only needs to run on 3 of them. But I want it to live centralized in the header for various reasons. My idea was to create an Option Set called “Magic Page” and input my 3 options as page titles (e.g. “list” representing my page titled “list” which lives at /list). On the magic workflow’s Only When clause, I tried to say, ‘run only when current page name IS IN my Magic Page option set:all options.’

The problem I ran into is that IS IN isn’t an available operator. IS NOT IN is there, but I don’t get IS IN - which is frankly odd. While I can certainly rename my Option Set to be “Magic-less Page” and have it be a list of the 7 pages where the magic is NOT needed, is there a way to write my desired logic, i.e. current page name IS IN that list of pages?

Hopefully that made sense. :slight_smile:

You can just do it the other way around… i.e. use: The Option Set Contains Current Page Name

Actually @adamhholmes that’s not an option either - another odd choice, it would seem. The closest I can get is “Get data from page URL.” Is there a trick to making that appear as a choice?
not an option

You need to use:

Only when: get an option (all options), each item’s Display (or other relevant text attribute): contains: page name

To get the page name you need to use Get data from URL, path segment as list, first item

1 Like

Thanks @adamhholmes ! I just learned something new. I’ll give that a try!

This topic was automatically closed after 70 days. New replies are no longer allowed.