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

Calculation formula

Status
Not open for further replies.

vpv

Programmer
Oct 30, 2003
24
RU
I need define calculation field :)fc.resp) with condition:
if :fc.rc=1 then :fc.resp:='Invalid merch' elsif.... end if.
but this expression generate error in property palette.
I try to use function "decode" and get the same result...
Where i wrong?
 
Are you trying to write this code into the property pallate?
If so you should try writing it into a trigger. Maybe you would like to clarify/elabourate on your post so it's easier to advise.
 
i write this code in item "Calculation formula " of property palette (item "resp"). I get error "Encountered the symbol "IF" when..."
:fc.resp - calculation field coupled with :fc.rc follow conditions:
if :fc.rc = 1 then :fc.resp='Invalid merch'
elsif :fc.rc = 2 then :fc.resp='Invalid card'
elsif :fc.rc = 3 then :fc.resp='Bad transac'
end if.


 
I don't think you can do this because you can't write an entire PL/SQL statement, although your code is accurate. I think the property pallate is more for setting simple formulas.

You will need to write the code into some kind of trigger - which one depends on the functionality you are trying to acheive.
 
I select "Pre block" trigger and type:
if :fc.rc=3 then :fc.resp:='Invalid Merchant';
elsif :fc.rc=55 then :fc.resp:='Invalid transaction';
elsif :fc.rc=75 then :fc.resp:='Invalid PIN';
end if;
but :fc.resp is empty on the form...
What do I make wrong?
 
Can you do this with a decode statement? If its too complicated for decode, you might want to create a procedure and call the procedure from the property-palette
 
thanks, bookouri...!
creating procedure solve problem...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top