跳至主內容

搜尋

搜尋

Strip Value To Left Of Character

評論

3 條評論

  • Avatar
    Shotaro Ito

    For BarTender 10.0 or later, that's easy..
    on the data source's Transforms tab > search and replace, add 2 actions.

    1. Search and Delete Everything Before: "/"

    2. Search and Delete: "/"

     

    For older versions, you need OnProcessData VB script in More options of the data source.

    'Find "/" and delete the "/" and text before'
    i = Instr(Value,"/")
    if i >= 1 Then
      Value  = Mid(Value, i+1)
    End If
    

     

    0
  • Avatar
    Michael Toupin (mtoupin

    You could even simplify it down further:
     

    value = mid(value,instr(value,"/") + 1)

    0
  • Avatar
    Legacy Poster

    Thanks for the script.  I couldn't use the transforms tab because I don't want it to do that always, it is based on some other field values.

    The script Mike gave me worked for my use!

     

    Thanks again

    0

登入寫評論。