Page 1 of 1

Compare address in all records and mark the longest

Posted: Thu Oct 28, 2010 4:09 pm
by Eric
The command below counts the number of characters in the field named Address and marks the record that has the largest number of characters.

Code: Select all

comFieldName="address"
SELECT MAX(LEN(allt(&comFieldName))) FROM (ALIAS()) INTO ARRAY _longest
LOCATE FOR LEN(allt(&comFieldName))=_longest(1)
REPLACE x WITH "X"

Compare address in all records and mark the longest update

Posted: Thu Dec 23, 2010 8:59 am
by deanmiller
This is a great tool for our inkjet specialist. It saves them a lot of time for proofing.

When I run this Command for address it will pick out the longest for all record whether they are deleted or not.

Is is possible to select only records that are not deleted?

more of a challenge,
Can a mark be placed in a designated field that is the longest. Say I have the field long_record. Can the letter x be placed in this field for the longest address.