Ants Posted January 5, 2006 Posted January 5, 2006 Can someone show me how to do incrementation? There is a file with the field "name" and the field "number of times" in it. When "Tom" is entered into the file the first time, the number 1 would appear in the "number of times" field. When "Tom" is entered again into the file (as a separate record), the "number of times" change to 2. I want to be able to not have a second record, but instead have one record with the 'number of times' as 2. Thanks.
Raybaudi Posted January 5, 2006 Posted January 5, 2006 Not sure that I understand you correctly, but this makes what you wish (or so I think), without script. Main.zip
Ants Posted January 7, 2006 Author Posted January 7, 2006 Thanks Raybaudi, What you have there isn't exactly what I need. I've included a copy of my file here. You will see that I have figured out a way to increment by the number of times the name is entered, but I have not been able to figure out how to delete the duplicate copies. For example, amongst others, I currently have the following in 3 records: Name Number of Times Jim 1 Jim 2 Jim 3 I only want to retain the record with "Jim" as the name and "3" as the number of times (as I have entered the name 3 times), but don't want the other 2. Any help would be appreciated! test_number_of_times.zip
Ants Posted January 9, 2006 Author Posted January 9, 2006 Thanks a lot raybaudi, this is exactly what I've been trying to accomplish! I altered the script a little (by adding a loop) as I wanted it to open a new record automatically. I currently set a script to read "If field = '#', go to last record and delete it". I had wanted to end the script automatically by pressing an "end" button, but have not been able to do that. Again, thanks so much!
Raybaudi Posted January 9, 2006 Posted January 9, 2006 Hi Ants you don't need to make a loop, my example just "open"(create) a new record and, if the name is the same of another record deletes the previous record and add 1 to the "Total times" field, else do nothing; neither you need an END script !
Ants Posted January 10, 2006 Author Posted January 10, 2006 Hi raybaudi, I wouldn't if this is exactly what I'm incorporating into my solution, but this is a mock test that I had made up to test incrementation. I tried using the same method yesterday in what I'm actually trying to do, but I buck against a wall again. I am actually trying to do an automatic scan of upc codes for a retail solution. Since the solution is in a portal and is linked to a line items file, it is somewhat different from a self-joined file. I am still working on it, altering a few steps, trying to figure out where the differences are and why it's not working as yet.
Ants Posted January 12, 2006 Author Posted January 12, 2006 Hi, I've been trying to incorporate the test methods into the present "solution", but can't seem to get anywhere. Can anyone help me out here? new_transaction_test.zip
Recommended Posts
This topic is 6892 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now