Add Qty

SEPCO

New Member
I am a very happy TracerPlus user and have built a dozen apps with it. I am however having issues with figuring out the way for my next app. We are looking for a way to scan a part no and qty and have the app total the qty for all the part no's individually. So I might scan 20 barcodes, 5 being the same and it total the scan qty for those 5.
 

Dan Peluso

Member
Staff member
Hi,

That type of solution might be a good fit for the AutoFind Feature turned ON for the barcode field and then something along the lines of an increment VARIABLE field for the qty. The AutoFind setting is in the After Scan field settings and the Increment Variable field can be configured by setting the Qty field to Type=Variable and then selecting Increment from the Variable Options tab,

That combination of settings sounds like it could do the trick for you.

Let me know if that helps.
 

SEPCO

New Member
Thank Dan, I looked at that, but the qty might change from scan to scan. For example in one box we might have 50 of item ABC and in another we might have 25 of item ABC so I need it to total at the end to show in that scanned area I have 75 of item ABC.
 

Dan Peluso

Member
Staff member
Ahh ok. So that is a wrinkle in my suggestion. The other thing I recommend for this type of scenario is to use calc fields and lookups to allow for either qty 1 or some other qty.

In that case, you would be using a seperate session to maintain the counts. A summarized description of this is as follows.

Session1: Scan your barcodes into this session.
Field 1: Scan your barcode
Field 2: Lookup any existing qty for this barcode id from session2. Present in this field- Readonly maybe
Field 3: Allow user to enter a qty here
Field 4: Assign as a calc field to add Field2 and 3. Set to DataType=Number. This is also assigned to be a lookup field like Field 2. Set the Lookup to do "Update Source"

Session 2: Basically a data storage session to accumulate all of your item counts
Field1: Barcode ID
Field2: Total qty.


In this scenario, you basically end up with 2 sessions both with data.
Session 1 contains each of your transactional scans for a given barcode. This may or may not be useful
Session 2 contains all of your item barcodes and their associated TOTAL quantities.

This type of approach is a little more complicated but may be closer to what you need.
 

SEPCO

New Member
Ok, I get the concept, but not figuring out how when I scan the the barcode in session one that it adds it to session 2. If I add barcodes to session 2 Field1, then it works beautifully., just can't figure out how to add the barcodes as I go with session1
 
Last edited:

Dan Peluso

Member
Staff member
As part of the lookup definition, you would use the Update Source option to write back the SUM value of the previous total quantity and the newly added/entered qty. In the Lookup settings tab, there is the option to Update Source and Append if not found. Both of these options would need to be turned ON for this to work. My original note did not mention this but enabling the "Append if not found" sounds like it would do the trick for you.
 

SEPCO

New Member
Ok, now I am stumped again. I created the project in a solo environment, only the 2 sessions (Project1) and it works beautifully. I re-created it in our main project (SEPCO_2019_rev3) and it does not work. I verified all the field settings are the same, the only diffrence I see is the way the form looks. I have attached both projects.
 

Attachments

Top