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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Procedure returns char instead of Number

Status
Not open for further replies.

haste

Programmer
Feb 27, 2005
96
GH
I have textfield that gets it values from a procedure. The prob is the returns a string instead of number. Its as follows:

function TOT_VALFormula return Number is
begin
RETURN ( NVL:)INVI_VALUE,0)- :CF_DISC_VAL );
end;

The result I get is something like:

16551 - 2000

I have checked the text field data type and its set to Number. Am running form 6i.
 
Assuming you have created the function in the porgram units section of forms builder, I have cut and pasted your code into a form and created text items as you have described. I cannot get a result other than 14551 in my target field.

Are you sure your function isnt overloaded?
 
Found the problem the record group that the function gets its values from is based on a query with a UNION. The query in this instance is returning rows from both SELECTs.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top