Jump to content

Calc step for "includes this text"?


This topic is 4762 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I kind of can't believe I don't know this / have never had to do this before, but there you go.

What syntax do I use in a Case calculation to indicate that I want a positive return if it contains (but is not limited to) my specified block of text? It's not " = ".

In other words, I want to write a Case calc that, in my brain, functions like this:

Case ( PeriodicalName CONTAINS "New York"; "Yes"; "No")

and returns

The New Yorker - Yes

The New York Times - Yes

Reader's Digest - No

Time Out New York - Yes

New Breeds of Yorkshire Terriers - No

York News - No

The New York Post - Yes

Rolling Stone - No

What structural element stands in for my imaginary 'CONTAINS'? A Google search wasn't immediately helpful, not least because, as is clear, I don't know what terminology to use.

_________________________________________________

The context:

This is for a DB that pops out HTML and CSS for event inclusion on a Web site. The Children's Department here at the public library has many different events with the name "Story Time," and many with the name "Kids cook," et c.

I want the events to pop out with their CSS ID styles in place, so that although most of the Children's Dept. events come out nicely formatted with <span id="kidsevent">, any Story Time thing - Walk-In Story Time, or Story Time On Thursday Afternoon, or End Of Session Story Time Concert - will be addressed with <span id="storytime">, and therefore will appear with the recognizable custom Story Time graphics on the site.

__________________________________________________

Although in my New York periodical example I framed this as a yes/no, it's not actually a binary calculation, which is why I need it to be a Case calc returning text. 'Story Time' is one of eight or nine series that need their own distinctive graphics displayed.

Thanks in advance.

Link to comment
Share on other sites

This topic is 4762 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.