Forum Discussion

DawnRene3's avatar
DawnRene3
Qrew Trainee
19 hours ago
Solved

Formula needed to pull out most recent status of a logged multiple choice field

I have a multiple choice field, PICC Request Status, that is also a logged field. Most recent choices are at the top and on their own line.

Trim(Right([PICC Request Status],"]")) pulls out the first logged status with the dashes: --------------Needs Review

The current field contains

-- [MAY-13-25 Molly Smith] --------------
Closed

-- [MAY-12-25 Molly Smith] --------------
Action In Progress

-- [MAY-12-25 Molly Smith] --------------
In Review

-- [MAY-12-25 Molly Smith] --------------
Needs Review

The end result of the formula should just be Closed. What do I need to adjust in my formula?

  • Tag teaming with my buddy Don,

    You are doing two things that are unusual, the prepending newest at the top and using the entries on a separate line causing those dashes.

     

    Try this ridiculous looking formula

    NotLeft(SearchAndReplace(Left(NotLeft([PICC Request Status],"]"),"["),"-",""),2)

     

     

5 Replies

  • Dawn,

    I like to do these in stages so I can follow my logic

    var text ParseOne = Right([PICC Request Status],"]");
    var text ParseTwo = Right($ParseOne, "-");
    $ParseTwo

    Give this a try.

    • DawnRene3's avatar
      DawnRene3
      Qrew Trainee

      Don, that was close. But it pulled out the oldest status, not the most recent status, with a space before it. 

       

      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend

        Tag teaming with my buddy Don,

        You are doing two things that are unusual, the prepending newest at the top and using the entries on a separate line causing those dashes.

         

        Try this ridiculous looking formula

        NotLeft(SearchAndReplace(Left(NotLeft([PICC Request Status],"]"),"["),"-",""),2)