I’m trying to programmatically update a comment field or a UD field when I scan a pack number.
What I’m trying to accomplish is: We have packslips (printed paper) with the packnumber that is barcoded, we then have an employee scan that barcode, that will then have a prompt always available dashboard to receive the scanned packnumber (see image) which will then update a field (probably UD field) within the ShipDtl table with the datetime stamp or the same pack number.
[barcode scanner will be set to hit F5 (refresh) after scan - or may need to programmatically make the prompt available for entry again]
Are you using an updatable dashboard based on an updateable BAQ? If so, could the BPM directives configuration on the updateable query help get you where you need to go with field update? I have found these useful for making default settings when user has entered data into updateable dashboard…
I’m using an updatable BAQ with an updatable dashboard.
Which method you think would work? I’ve tried with getlist, fieldvalidate, but it updates every pack rather than the pack that is selected. - also which processing?
My goal is to have an employee simply scan the pack on the paper, have it input the pack number into the parameter for the dashboard, and also fill out and save the pack number to a field in the dashboard.
@kyle.l I think your are posting how to fix my process as opposed to how to solve the issue as @Mark_Wonsil referenced the the other day.
You don’t need parameters just a tracker view to filter or leave it wide open. The field or even a calculated field can be updatable and with a short amount of code on update this can be done. I think you want to put the info on ShipHead unless it is different for each line of the pack.
/* update ShipHead */
foreach (var ttResultsRow in ttResults.Where(row=> !row.Unchanged()))
var ShipHead = Db.ShipHead.Where(row=> row.Company == CompanyID && row.SysRowID == ttResultsRow.ShipHead_SysRowID).FirstOrDefault();
if (ShipHead != null)
@kyle.l You are making this more complex than is needed. Attached is a working dashboard and baq for this. If you are going to update the ShipComment then that is not a UD field. the code is on Update.
Enter packnum, click refresh, enter comment click save. If you make the results all packs for a day then as they move to another row it will save.
My goal was to programmatically enter either the same packnumber or datetime into the comment field when the pack number is scanned. The idea is to have this tracker view you sent open at all times, and an employee will simply scan the packnumber while they’re away from the PC, (Bluetooth Scanner). we need to know what time the pack was scanned, this info would then be stored either in the UD field or comment field on that specific pack.
I would have the barcode scanner prefix set to clear, , carriage return. This process should trigger an update to the comment field with with the current date and time.
@kyle.l I think this can be done with a ubaq just on a UD table with allow new record and little or no screen customizing.
Have one field on the grid for the packnum. Leave one blank row in the UD table and auto load the dashboard on open. or on load call add new.
The enter from the scanner will advance the grid and put the packnum into the update. The code will call the pack line(s) by packnum and update the comment. Cursor should be in the grid ready for the next scan.