Home » Developer & Programmer » Forms » Summation (Forms 6i)
Summation [message #432471] Tue, 24 November 2009 06:51 Go to next message
arif_md2009
Messages: 732
Registered: May 2009
Location: United Arab Emirates
Senior Member

I have a tabular form with two fields item and qty .i want to track the sum of qty that i enter line by line into a seperate calculated display field and i want to thow error based on this field .how can i do it.
Re: Summation [message #432474 is a reply to message #432471] Tue, 24 November 2009 07:11 Go to previous messageGo to next message
gurupatham
Messages: 66
Registered: March 2008
Location: Chennai
Member
Create a separate display item under same/different Block.

In Property palette of the created item,

Set the Number of item displayed to 1 ( incase of same Block)
Calculation mode to Summary
Summary function to Sum
Summarized Block to the Block name
Summarized item to the item name that need to be Summarized.
Re: Summation [message #432476 is a reply to message #432474] Tue, 24 November 2009 07:25 Go to previous messageGo to next message
arif_md2009
Messages: 732
Registered: May 2009
Location: United Arab Emirates
Senior Member

hi
when i a trying to add the summary column i am getting error message while generation

FRM-30377: Summary item must reside in single-record block or in same block as summarized item.
Item: M_COUNT
Block: OW_AIC_PHY_STK_ITEM
FRM-30085: Unable to adjust form for output.
Re: Summation [message #432479 is a reply to message #432476] Tue, 24 November 2009 07:35 Go to previous messageGo to next message
gurupatham
Messages: 66
Registered: March 2008
Location: Chennai
Member
Now the Calculation field is in another multi record Block.So it throws error.

Replace the Calculation field to the same Block with the property
Number of item displayed to 1 or move to the single record block.

Re: Summation [message #432480 is a reply to message #432479] Tue, 24 November 2009 07:41 Go to previous messageGo to next message
arif_md2009
Messages: 732
Registered: May 2009
Location: United Arab Emirates
Senior Member

I managed to do that summation field .Actually now my requirement is i want to compare this summation field to item qty field and put a validation.Like i have 2 tabs one item with qty and one batch item which has multiple lines for one item.

eg.

tab item
item qty

a 10

tab batch

item batch qty
a 101 5
a 102 5

if user enter another item a with batch 103 with extra 1 qty in batch tab it will become greater than item qty and it must throw error.even if its less.Shall i compare this summary field to item qty on when validate item trigger.
Re: Summation [message #432483 is a reply to message #432471] Tue, 24 November 2009 07:46 Go to previous message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
I'd just use a select statement to get the summary quantity in the WVI trigger.
Previous Topic: change the name of the field
Next Topic: Need to user Return Key for Querying Data !!
Goto Forum:
  


Current Time: Fri Sep 20 09:50:58 CDT 2024