AnsweredAssumed Answered

Double Quote in Label Expression

Question asked by michaelneer on Dec 18, 2014
Latest reply on Dec 19, 2014 by 924216004



Trying to get my label expression to work here.  The problem is some of my table

records have a double quote in it (" symbol).  I want to rename as such see example below:


(30" PVC Pipe Drain)  and rename it to (30 inch)


I use the following vbScript - but get nowhere:


Function FindLabel ( [NAME] )

If Not IsNull([NAME]) Then

NewStr = Replace([NAME], "30'' PVC Pipe Drain", "30 inch")

  FindLabel = NewStr

End If

End Function


  --- also I tried python and get nowhere:


def FindLabel ( [NAME] ):

  S = [NAME]

  S = S.replace( '30'' Drain, Vitreous Clay Pipe', '30 in')

  return S