Function FindLabel ( [Depth] ) If Round([Depth]) > 0 Then fltDepth = Round([Depth], 1) Else fltDepth = Round([Depth] * -1, 1) End If strChar = "." intPos = InStr(1, fltDepth, strChar) intLen1 = Len(fltDepth) intLen2 = intLen1 - intPos If intPos <> 0 Then intStart = Left(fltDepth, intPos - 1) intLast = Right(fltDepth, intLen2) 'strOutput = intStart & " " & intLast FindLabel = intStart & "<SUB>" & intLast & "</SUB>" Else FindLabel = fltDepth End If If fltDepth > 0 Then FindLabel = "<UND>" & FindLabel & "</UND>" End If 'FindLabel = strOutput End Function
Hello Aaron,Looks like you might need a conditional branch around the second statement:fltDepth = Round([Depth] * -1, 1)Where you check if [Depth] is greater than zero and only apply the multiplication factor of -1 if it is less than zero. As for your second question on how to apply underlining only to the positive drying heights, you could apply it only if the depths value is greater than zero in your conditional block.Thanks,Sabeshan Srinivasan
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.