FORMATting a decimal into a string

CannikinCannikin Member Posts: 72
We've got a column that's going to be one of two things:
- If a Work Center No. is available, show it
- Otherwise, show the Reserved Quantity

So what I'm doing is creating a single global variable called internalRsvQty, making it a string and setting it to the value of one or the other, like so:
IF "Work Center No." = '' THEN
  internalRsvQty := FORMAT("Reserved Quantity")
ELSE
  internalRsvQty := "Work Center No.";


When I print my form all I get are 0's (zeros) everywhere except where there should be a Work Center No. -- that's actually displaying correctly. But the Reserved Quantity just seems to be getting ignored. What am I doing wrong?

Comments

  • pdjpdj Member Posts: 643
    Sounds like you'll need a CALCFIELDS("Reserved Quantity").
    When a flowfield is directly on a form it is calculated automatically. However; in code you will have to do it manually.
    Regards
    Peter
  • CannikinCannikin Member Posts: 72
    It worked! Thanks dude!
Sign In or Register to comment.