Stock Control
Description: Take stock and flag any item that needs to be reordered. There is also an arbritary
setting in Save Screen's OnEnter to flag an order as a priority reorder if a reorder is required and the
lead time is 2 weeks or more (>=15).
Steps to recreate:
1. Configure the capture file.
2. Create lookups.
3. Create all screens
4. Create all fields
5. Create all global variables
6. Fill in all Screen OnEnter/OnExit Scripts
7. Fill in all Field OnEnter/OnExit Scripts
8. Go back and fill in Static Text, Graphical Characters, and boxes to adjust screen appearance to your personal preference.
Capture File:
ItemNum
QTY
IssueReorder
Priority
MinNumToOrder
Lookup File:
ItemNum
Description
LeadTime
ReorderPoint
ReorderAmount
Global Variables:
temp
ItemNum
Qty
IssueReorder
Priority
MinNumToOrder
Description
LeadTime
ReorderPoint
ReorderAmount
Screens:
1. ItemScreen
Validation, Uncheck unmodified default is invalid , unmodified should be valid
Validation, Uncheck blank field is invalid
Field OnExit
Screen Field Operation update ItemNum with value of field ITEMNUMField
Lookup File Operation, Move to first record
Lookup File Operation, Find Matching Row, MatchField ItemNum , MatchVariable ItemNum
Get Field Value, Field: Description Variable: Description
Lookup File Operation, Stay on current row
Get Field Value, Field: LeadTime Variable: LeadTime
Lookup File Operation, Stay on current row
Get Field Value, Field: ReorderPoint Variable: ReorderPoint
Lookup File Operation, Stay on current row
Get Field Value, Field: ReorderAmount Variable: ReorderAmount
Screen OnExit
Capture File Operation, Move to first record
Capture File Operation, Find Matching Row, MatchField ItemNum , MatchVariable ItemNum
Get Field Value, Field: Qty Variable: Qty
Capture File Operation, Stay on current row
Get Field Value, Field: IssueOrder Variable: IssueOrder
Capture File Operation, Stay on current row
Get Field Value, Field: Priority Variable: Priority
Capture File Operation, Stay on current row
Get Field Value, Field: MinNumToOrder Variable: MinNumToOrder
QTYScreen
Screen OnEnter
Screen Field Operation, Update ITEMNUMField with value of variable ItemNum
Screen Field Operation, Update DESCField with value of variable Description
Screen Field Operation, Update QTYField with value of variable Qty
QTYField
Validation, Uncheck unmodified default is invalid , unmodified should be valid
Validation, Uncheck blank field is invalid
Validation, Uncheck unmodified default is invalid , unmodified should be valid
Validation, Uncheck blank field is invalid
Input, Check Field is display only
Validation, Uncheck unmodified default is invalid , unmodified should be valid
Validation, Uncheck blank field is invalid
Input, Check Field is display only
Screen OnExit
Screen Field Operation, Update Qty with value of field temp
Operation, if Value1:Variable:temp is not equal to Value2:variable:ItemNum then jump to label, QtyScrCont
Handheld beep: High, Chirp, Once (third, first, first)
Operation, Value1:numeric:1 add to Value2:variable:Qty , story in Qty
Jump to Screen, QTYScreen
Label, QtyScrCont
Screen Field Operation, Update QTYField with value of variable Qty
SaveScreen
Screen OnEnter
Branch, Value1:variable:Qty is greater than Value2:variable:ReorderPoint then jump to label OnToNext
Operation, Value1:text:Yes assign directly to store in IssueReorder
Operation, Value1:variable:ReorderAmount subract Value2:variable:Qty and store in MinNumToOrder
Operation, Value1:variable:MinNumToOrder add to Value2:numeric:1 and store in MinNumToOrder
Branch, Value1:variable:LeadTime is less than Value2:numeric:15 then jump to NotPriorityOrder
Operation, Value1:text:Yes assign directly to store in Priority
Branch to label OnToNext always
Label, NotPriorityOrder
Operation, Value1:text:No assign directly to store in Priority
Branch to label OnToNext always
Label, NoReorder
Operation, Value1:text:No assign directly to store in IssueReorder
Label, OnToNext
Screen Field Operation, Update ITEMNUMField with value of variable ItemNum
Screen Field Operation, Update QTYField with value of variable Qty
Screen Field Operation, Update ISSUEField with value of variable IssueReorder
Screen Field Operation, Update RIORITYField with value of variable Priority
Screen Field Operation, Update MININORDField with value of variable MinNumToOrder
ITEMNUMField
Details: Write to capture ItemNum
Validation, Uncheck unmodified default is invalid , unmodified should be valid
Validation, Uncheck blank field is invalid
Input, Check Field is display only
Details: Write to capture QTY
Validation, Uncheck unmodified default is invalid , unmodified should be valid
Validation, Uncheck blank field is invalid
Input, Check Field is display only
Details: Write to capture IssueReorder
Validation, Uncheck unmodified default is invalid , unmodified should be valid
Validation, Uncheck blank field is invalid
Input, Check Field is display only
Details: Write to capture Priority
Validation, Uncheck unmodified default is invalid , unmodified should be valid
Validation, Uncheck blank field is invalid
Input, Check Field is display only
Details: Write to capture MinNumToOrder
Validation, Uncheck unmodified default is invalid , unmodified should be valid
Validation, Uncheck blank field is invalid
Input, Check Field is display only
Screen OnExit
Wait, 5000 ms (5 seconds)
Jump to Screen: ItemScreen
Menus:
None
Back to Sample Programs