• I'm trying to get the last part of a DDNA on a label. It seems I can't use negative substrings.

    !!ce.ddna.name.part(-1,'/') gives me what I want. But I need that in the ATEX the label, #DDNA(P:-1) returns an error...

    Any advice?
  • Which is the part delimiter?
    It seems you have not included in your "P" syntax.

    The substring required is specified by following the code word with a substring descriptor of the form:
    (P-n1:n2)
    Here P indicates that n1 and n2 refer to delimiter numbers and ‘-‘ indicates the character used as the delimiter. If omitted, ‘/’ is assumed. The delimiter must not be numeric.


    Could you post here what is the full DDNA and what are you expecting?
  • Try using this:

    Btext (IFTRUE((TYPE OF OWN OF DDNAME) EQ 'EQUI','#NAME(P/2:)(C2:)','#NAME(P/3:)(C2:)'))

    ;-)
  • Hey corrado,

    This is for nozzle labels, sometimes the nozzles are a child of an equi and sometimes they are a child of a sube.

    I'd like the label to work for either:
    /1200-TK-001/N1
    /1200-PP-001/DISCHARGE/N1

    The label should just display N1. The pml !!ce.ddna.name.part(-1,'/') works fine, but can't get it to work with Draft intelligent text, I thought #DDNA(P:-1) would be work.

    It's not a HUGE deal I can just tell them to use #ddna(p3:)(c2:) for nozzles in a SUBE and #ddna(p2:)(c2:) for nozzles in an equi. But it'd be nice to just have one string that works with all of them.
  • That's pretty awesome! Never new you could do if statements in the BTEXT! Works great for a GLAB, but not so much with a SYTM.

    When I change the BTEXT of the TEXP in the SYTM to (IFTRUE((TYPE OF OWN OF DDNAME) EQ 'EQUI','#NAME(P/2:)(C2:)','#NAME(P/3:)(C2:)')) the SYTM just displays #NAME(P/3:)(C2:). I also tried wrapping it in ||'s to keep the entire string, but that doesn't work.