Skip to main content

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.

 

lotis Fri, 01/25/2019 - 00:11

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

lotis Fri, 01/25/2019 - 00:12

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 Fri, 01/25/2019 - 07:40

In reply to by lotis

Hi Lotis,

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

Brian

Anthony.Kariuki Mon, 08/24/2020 - 05:40

 
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 Tue, 09/15/2020 - 07:18

The solution above resolves the issue

Brian Element Fri, 11/13/2020 - 06:34
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.