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!

R5 @IF and @SETFIELD 2

Status
Not open for further replies.

vaylen

Technical User
Nov 11, 2002
25
GB
FIELD SalesVol := SalesVol ;
@If (SalesChoice = "Outer" | SalesChoice = "Single" ; @SetField (SalesVol ; SalesTotal) ;@SetField (SalesVol ; SalesTotal / SalesOuter)) ;

Ok I give up been playing with this for hours now and would love some help ..... PLEASE.....

All I want to do is put the vale of SalesTotal in SalesVol if its an outer and if not the value of SalesTotal/SalesOuter.

The above code says text expected and does not open the form and number expected if I put the SalesVol in "" !

Thanks

 
The code looks OK. One thing to remember is that Notes calculates any computed fields from the top of the form down. You need to make sure that any field that depends on another fields value is after that field.

One thing I've just spotted in the code is that you might need to put SalesTotal\Sales in brackets and reverse the slash to make it (SalesTotal\Sales).

Hope this helps
 
Why not do it like this :

FIELD SalesVol := @If (SalesChoice = "Outer" | SalesChoice = "Single" ; SalesTotal ;SalesTotal / SalesOuter) ;

Pascal.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top