Skip to Content
author's profile photo Former Member
Former Member

Formula - word extraction

I have a formula that extracts the numbr after the x and is used in a calculation. Now the word "fix is being entered before the x5 and it is messing up the formula. Can someone tell me how I can extract the word fix or fixed from this string so my formula below works again.

STRING

fix - x5/zpwv/q2/r57/c89/zons/q1/r104/zbp/q2/r43/u10

Formula

IF Len({@Convert Labor Ticket to Lower Case}) -

Len(Replace({@Convert Labor Ticket to Lower Case},"x","")) >= 1

THEN SPLIT({@Convert Labor Ticket to Lower Case},"/") [1]

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Apr 18, 2011 at 07:28 PM

    Hi,

    I think the main issue is to pickup the value after 'x' to calculate :

    can you try the below formula to pickup the value :

    Mid((trim(mid({@formula},instr({@formula}, 'fix')3))), (instr((trim(mid({@formula},instr({@formula}, 'fix')3))),'x')+1),1)

    Thanks,

    Sastry

    Note : @formula is nothing but your databse field.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      A couple of changes and this worked well. Thanks.

      Working Formula:

      if instr({@Convert Labor Tickt to Lower Case},'fixed')= 1

      then (trim(mid({@Convert Labor Tickt to Lower Case},instr({@Convert Labor Tickt to Lower Case}, 'fixed')+5)))

      else if

      instr({@Convert Labor Tickt to Lower Case},'fix') = 1

      then (trim(mid({@Convert Labor Tickt to Lower Case},instr({@Convert Labor Tickt to Lower Case}, 'fix')+3)))

      else

      {@Convert Labor Tickt to Lower Case}

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.