INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Expression column  (Read 865 times)

peterdrowan

  • Junior Woodchuck
  • **
  • Posts: 62
Expression column
« on: October 15, 2013, 02:43:42 pm »

I have a Name field for a Podcast that usually contains the Episode number as"Episode xxx" etc. so I have created an expression field (EpisodeNumber) that extracts the number e.g Mid([name],8,3) pulls out the number but there are some Episodes that are question episodes that don't contain that Episode text so I have tried to use an IF() to only do the mid if the Name starts with Ep else return 0. I have tried many attempts at the syntax but is doesn't seem to work e.g.
If((Mid([name],0,2)=Ep),Mid([name],8,3),0). None of these work as planned.  How do I do what I want.

Peter Rowan
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Expression column
« Reply #1 on: October 15, 2013, 03:04:39 pm »

if(regex([Name], /#Episode (\d+)#/), [R1], 0)
Logged
The opinions I express represent my own folly.

peterdrowan

  • Junior Woodchuck
  • **
  • Posts: 62
Re: Expression column
« Reply #2 on: October 15, 2013, 03:54:31 pm »

Works fine. Thanks.

Regards
Logged

peterdrowan

  • Junior Woodchuck
  • **
  • Posts: 62
Re: Expression column
« Reply #3 on: October 15, 2013, 03:57:08 pm »

I worked that out (using[Name]) just after I replied which crossed with your reply. Thanks.

Regards
Logged
Pages: [1]   Go Up