PDA

View Full Version : First or Last Didgets in CTAB



Zuke
2008-03-13, 06:03 AM
Here is another doosy of a question i would like some advice on.

Does anyone know how to make a field via diesel or anything alse that refers to "CTAB" value and inserts only the first 4 digits or the last 4 digits.

eg.

CTAB = drawing - 03

The field displayed via your exprssion is " DRAW " which is the fist 4 digits of the ctab value.

then another expression that will give me the last 2 digits
" 03 " in this example.

Any thoughts?

Zuke
2008-03-14, 02:43 AM
Answer

$(substr,$(getvar,ctab), 4,2)

Add this as a diesel expression to a field and modify the last 2 numbers in the string to change which set of digits you end up with.

Very handy...

Chris.N
2008-03-16, 06:16 PM
thanks for posting the answer!