What am I doing wrong? 
Author Message
 What am I doing wrong?

hello,, i am trying to have automatic assigning to various price fields
given a unit cost (as shown below) and it's located in embed, accepted..

but when 'ok' control is accepted it reverts to the fomula eventhough
the user chages the default.. why?  tried all the validation controls
and excluded these appropriaate fields.. no luck..

If ThisWindow.Request = InsertRecord
  INH:ListPrice  = (INH:UnitCost / (1 - GEN:R1MarkUp))
  INH:WholeSale1 = (INH:UnitCost / (1 - GEN:W1MarkUp))
  INH:WholeSale2 = (INH:UnitCost / (1 - GEN:W2MarkUp))
  INH:WholeSale3 = (INH:UnitCost / (1 - GEN:W3MarkUp))
  INH:WholeSale4 = (INH:UnitCost / (1 - GEN:W4MarkUp))
  INH:WholeSale5 = (INH:UnitCost / (1 - GEN:W5MarkUp))
  Display(?INH:ListPrice)
  Display(?INH:WholeSale1)
  Display(?INH:WholeSale2)
  Display(?INH:WholeSale3)
  Display(?INH:WholeSale4)
  Display(?INH:WholeSale5)
End

tia
{*filter*}



Wed, 31 Oct 2001 03:00:00 GMT  
 What am I doing wrong?
Back in CW2.0 I had to check for window:acceptall, and if that was
true, then not run the formula.  Have you tried putting the formulas
in as a record-primer formula?

v/r

Svein-Erik Hoffg?rd

Quote:

> hello,, i am trying to have automatic assigning to various price fields
> given a unit cost (as shown below) and it's located in embed, accepted..

> but when 'ok' control is accepted it reverts to the fomula eventhough
> the user chages the default.. why?  tried all the validation controls
> and excluded these appropriaate fields.. no luck..

> If ThisWindow.Request = InsertRecord
>   INH:ListPrice  = (INH:UnitCost / (1 - GEN:R1MarkUp))
>   INH:WholeSale1 = (INH:UnitCost / (1 - GEN:W1MarkUp))
>   INH:WholeSale2 = (INH:UnitCost / (1 - GEN:W2MarkUp))
>   INH:WholeSale3 = (INH:UnitCost / (1 - GEN:W3MarkUp))
>   INH:WholeSale4 = (INH:UnitCost / (1 - GEN:W4MarkUp))
>   INH:WholeSale5 = (INH:UnitCost / (1 - GEN:W5MarkUp))
>   Display(?INH:ListPrice)
>   Display(?INH:WholeSale1)
>   Display(?INH:WholeSale2)
>   Display(?INH:WholeSale3)
>   Display(?INH:WholeSale4)
>   Display(?INH:WholeSale5)
> End

> tia
> {*filter*}



Wed, 31 Oct 2001 03:00:00 GMT  
 What am I doing wrong?
try wrapping the code with the following:



Quote:
>hello,, i am trying to have automatic assigning to various price fields
>given a unit cost (as shown below) and it's located in embed, accepted..

>but when 'ok' control is accepted it reverts to the fomula eventhough
>the user chages the default.. why?  tried all the validation controls
>and excluded these appropriaate fields.. no luck..

IF ~thiswindow{PROP:Acceptall}
Quote:
>If ThisWindow.Request = InsertRecord
>  INH:ListPrice  = (INH:UnitCost / (1 - GEN:R1MarkUp))
>  INH:WholeSale1 = (INH:UnitCost / (1 - GEN:W1MarkUp))
>  INH:WholeSale2 = (INH:UnitCost / (1 - GEN:W2MarkUp))
>  INH:WholeSale3 = (INH:UnitCost / (1 - GEN:W3MarkUp))
>  INH:WholeSale4 = (INH:UnitCost / (1 - GEN:W4MarkUp))
>  INH:WholeSale5 = (INH:UnitCost / (1 - GEN:W5MarkUp))
>  Display(?INH:ListPrice)
>  Display(?INH:WholeSale1)
>  Display(?INH:WholeSale2)
>  Display(?INH:WholeSale3)
>  Display(?INH:WholeSale4)
>  Display(?INH:WholeSale5)
>End
END!IF

>tia
>{*filter*}



Wed, 31 Oct 2001 03:00:00 GMT  
 What am I doing wrong?
! T H A N K  Y O U !
Works like a charm. :)
Quote:

> try wrapping the code with the following:



> >hello,, i am trying to have automatic assigning to various price fields
> >given a unit cost (as shown below) and it's located in embed, accepted..

> >but when 'ok' control is accepted it reverts to the fomula eventhough
> >the user chages the default.. why?  tried all the validation controls
> >and excluded these appropriaate fields.. no luck..

> IF ~thiswindow{PROP:Acceptall}
> >If ThisWindow.Request = InsertRecord
> >  INH:ListPrice  = (INH:UnitCost / (1 - GEN:R1MarkUp))
> >  INH:WholeSale1 = (INH:UnitCost / (1 - GEN:W1MarkUp))
> >  INH:WholeSale2 = (INH:UnitCost / (1 - GEN:W2MarkUp))
> >  INH:WholeSale3 = (INH:UnitCost / (1 - GEN:W3MarkUp))
> >  INH:WholeSale4 = (INH:UnitCost / (1 - GEN:W4MarkUp))
> >  INH:WholeSale5 = (INH:UnitCost / (1 - GEN:W5MarkUp))
> >  Display(?INH:ListPrice)
> >  Display(?INH:WholeSale1)
> >  Display(?INH:WholeSale2)
> >  Display(?INH:WholeSale3)
> >  Display(?INH:WholeSale4)
> >  Display(?INH:WholeSale5)
> >End
> END!IF

> >tia
> >{*filter*}



Thu, 01 Nov 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. What am I doing wrong!

2. What am I doing wrong?

3. Stupid newb question: What am I doing wrong?

4. What am I doing Wrong

5. what am i doing wrong

6. Help - What am I doing wrong

7. Saving a Variable to a field in a record- what am i doing wrong

8. What am I doing wrong?

9. #CONTROL What am I doing wrong

10. What am i doing wrong.

11. What am I doing wrong?

12. Clarion 5.5 What am I doing wrong????

 

 
Powered by phpBB® Forum Software