Generate Audit Number

Background: 

This script will create an number field that keeps a count based on the selected field.  When the contents of the field change it resets to 0 and starts the count over.  There is also a second script that will order the field based on a date field.

Documentation: 

This script will create an number field that keeps a count based on the selected field.  When the contents of the field change it resets to 0 and starts the count over.

To use this script you must select a file and a field to perform the count on.

Using the sales transaction file as an example and selecting the PROD_CODE as the field we get the following:

If we index the file by PROD_CODE you will see that the auto number changes with the contents of the PROD_CODE changes.

 

Comments

Hi
I would like to create an number field that keeps a count based on the selected field.  When the content of the field change it resets to 0 and starts the count over however, i want it to consider the dates also such that the oldest date is assigned the earliest number

Hi
I would like to create an number field that keeps a count based on the selected field.  When the content of the field change it resets to 0 and starts the count over however, i want it to consider the dates also such that the oldest date is assigned the earliest number

Brian Element's picture

Hi Lotis,

I have posted a second script that is what I think you are looking for.  

Brian

This is exactly what I was Looking for.
Thanks a lot

Thank you Brian

Anthony.Kariuki's picture

 
I would like to create an number field that keeps a count based on the selected field(Farmer No Or Name).  When the content of the field change it resets to 0 and starts the count  over -Even if he reappears again however, i want it to consider the dates such that on a certain day everytime he appears the count resets
E.g
Farmer_Name Farmer_No Transaction_Code BagTag/Appended_Field
John     KP01   T_09_01   1
John KP01 T_09_02  2
John Kp01 T_09_03 3
Tom Kp02  T_09_04  1
John Kp01 T_o9_05 1

Anthony.Kariuki's picture

The solution above resolves the issue

I an unable to open this huhu. Says the file extension should be .ism?

Brian Element's picture

That is because the script is for an ASCII version of IDEA and you have the unicode version. If you go to the IDEA passport and look in the IDEAScript vault there is a script that will do the conversation, it is called "Convert ASCII IDEAScripts for use in Unicode". You can also get a copy of the Utility Smart Analyzer app in passport as it contains an improved version of this application.