Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scrolling window values

Status
Not open for further replies.

tommy19

Programmer
Aug 23, 2001
49
US
Hi I am fairly new to Dex. I am trying to walk through the values on the Sales Transaction Entry. I need to calculate the weight of each item (based on quantity) to do some funky calculations on freight.

How would I walk through the items in the scroll window and get each item number and quantity?

Thanks in advance...
 
If you are doing this at the dex level, I would use Window_PullFocus() to take the focus away from the window, which will force the current line to be saved.

Then I would set a range on the SOP_LINE_WORK table and do your calculations by scrolling through the table. For example:

Window_PullFocus(window SOP_Entry of form SOP_Entry);

range clear table SOP_LINE_WORK;
clear table SOP_LINE_WORK;
'SOP Type' of table SOP_LINE_WORK = 'SOP Type' of window SOP_Entry of form SOP_Entry;
'SOP Number' of table SOP_LINE_WORK = 'SOP Number' of window SOP_Entry of form SOP_Entry;
range start table SOP_LINE_WORK by number 1;
fill table SOP_LINE_WORK;
'SOP Type' of table SOP_LINE_WORK = 'SOP Type' of window SOP_Entry of form SOP_Entry;
'SOP Number' of table SOP_LINE_WORK = 'SOP Number' of window SOP_Entry of form SOP_Entry;
range end table SOP_LINE_WORK by number 1;

get first table SOP_LINE_WORK by number 1;
while err() <> EOF do
{ Do Calculations Here }

get next table SOP_LINE_WORK by number 1;
end while;
range clear table SOP_LINE_WORK;


David Musgrave [MSFT]
Senior Development Consultant
Escalation Engineer
MBS Support - Asia Pacific

Microsoft Business Solutions

Any views contained within are my personal views and
not necessarily Microsoft Business Solutions policy.
This posting is provided "AS IS" with no warranties,
and confers no rights.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top