Skip to main content

Search

Search

Find And Replace Data In Text Object

Comments

5 comments

  • Avatar
    Shotaro Ito

    Neither I can find the way - search and replace only works within the same data source(field). It looks you need to modify each data source, though that could be a bit tedious. 

    0
  • Avatar
    Legacy Poster

    In the end I kind of found a way ..... I created a string of all the fields in a vb script and did a transform search and replace on that.  

     

    Doing this worked but created a new problem in that I could not suppress a field if it contained no data and as each field was separated by a line feed I ended up with a number of empty rows.

     

    Any ideas on how to get rid of all the empty rows?

     

    Regards

    Nicky

    0
  • Avatar
    Shotaro Ito

    Great idea!

    If the line feeds are separated data source, you can suppress the data source depends on previous data source is empty or not, from Suppression Transform.

    0
  • Avatar
    Legacy Poster

    Hi,

     

    Would anyone be able to help with how to insert a hyphen in the value generated from a VB script of HEX (hexadecimal)? For example, HEX(1772) = 6EC. Goal: insert hyphen between 6&E, thus "6-EC". I've tried VB script ----> Value = Replace(Hex(Field("ttimfc010101.t_mser")),2,0,"-"), but received script error <Line 6: Type mismatch: [string: "-"]>. Also, Padding does not work after on VB Script value. Any tips will be appreciated. Thanks.

    0
  • Avatar
    Shotaro Ito

    Would this help?

    h=Hex(1772)
    value = left(h,1) & "-" & mid(h,2,2)
    

    Instead of VB script, there's data source Transform called Character template.

    (in data source > Transform tab > Character template)

    Tto make XXX to X-XX, template will be ?-??.

     
    0

Please sign in to leave a comment.