Support 805.461.7300
Sales
Our Technology. Your Success.

Count marked records and fill count into another field

This command can take the total number of times a given value is in a field, and put the count into another field. In the example below, if you have 50 marked records, it'll put the number 50 into field1 for every marked record.

PUBLIC com_Count
SET TALK OFF
COUNT FOR !EMPTY(x) TO com_Count
REPLACE field1 WITH ALLT(STR(com_Count)) FOR !EMPTY(x)

For the sake of looking at a specific value in a field, you could change the last two lines of the command to:
COUNT FOR "X" $ x TO com_Count
REPLACE field1 WITH ALLT(STR(com_Count)) FOR "X" $ x 

If field1 is a Numeric type field, change the last line of the command to read:

REPLACE field1 WITH com_Count FOR !EMPTY(x)

« Back to Commands

I was looking for an easy to use all-in-one postal software solution and was working with Satori Software. They quoted me $10,000.00 which was out of the realm of our budget. I was also lead to believe that they were the only solution, until I found Accuzip. I was able to save my company over $9,000.00 with one phone call to your courteous and knowledgeable sales staff. Your product does everything that we need and much much more. Thank you Accuzip!
J.S., Newark, OH