Multivalue symbolics (OpenInsight Specific)
At 21 APR 1998 07:25:45PM Don Bakke wrote:
I'm converting an old AREV app to OI and for some reason I'm not able to get my simple symbolics for a window to behave properly. What's more frustrating is that this should be a simple issue but my mind can't seem to hone in on this one. So…
The window in question is meant to track the direct cost of labor for employees on a job. The (associated) multi-valued fields are:
EMP_ID,
NAME(symbolic),
REG_HRS,
OT_HRS,
RATE(symbolic), and
SUB_TOTAL(symbolic).
I'm having trouble with
NAMEand
SUB_TOTAL. The formula for <code> NAMEis:
* @RECORD=EMP_ID * Field 1 in EMPLOYEES=FIRST_NAME * Field 2 in EMPLOYEES=LAST_NAME @ANS=Xlate("EMPLOYEES", @RECORD, 1, "X"):" ":@ANS=Xlate("EMPLOYEES", @RECORD, 2, "X")The problem with the above is that the last name won't appear in the same cell as the first name. The last name for the first row employee appears in the last row of the edittable! If I modify the code to only equal to the first name (or last name) it appears correct. My workaround has been to create a symbolic in the EMPLOYEES table call
Full_nameand change the above to be:
@ANS=Xlate("EMPLOYEES", @RECORD, "FULL_NAME", "X")The formula for
SUB_TOTALis:
* @RECORD=REG_HRS * @RECORD=OT_HRS Reg_pay=Oconv((@RECORD *** {RATE}), "MD2") OT_pay=Oconv((@RECORD *** {RATE} *** REUSE(1.50)), "MD2") @ANS=Reg_pay +++ OT_payOI's Table Builder doesn't like REUSE and I forget how else to multiply a multivalue variable against a constant (see, I'm not myself today!).
Any ideas anybody?
TIA,
At 22 APR 1998 04:48AM Oystein Reigem wrote:
Don,
@ANS=Xlate("EMPLOYEES", @RECORD, 1, "X"):" ":@ANS=Xlate("EMPLOYEES", @RECORD, 2, "X") The problem with the above is that the last name won't appear in the same cell as the first name.
There's an error in the program line above (the extra "@ANS
, but not one that would give the result you describe. At least in my system the above is executed as
@ANS=(string1=string2)
and yielding a boolean value.
OI's Table Builder doesn't like REUSE and I forget how else to multiply a multivalue variable against a constant (see, I'm not myself today!).
I didn't think there was a smart way to do that. I emulate Reuse the hard way with
Clones=str( Value:@VM, Count )
Clones-1, 1='
or
if Count ] 0 then
Clones=str( Value:@VM, Count - 1 ) : Valueend else
Clones="end
- Oystein -
At 22 APR 1998 08:26AM Don Bakke wrote:
Oystein,
@ANS=Xlate("EMPLOYEES", @RECORD, 1, "X"):" ":@ANS=Xlate("EMPLOYEES", @RECORD, 2, "X")
Oops! That was a typo. It actually looks like this:
@ANS=Xlate("EMPLOYEES", @RECORD, 1, "X"):" ":Xlate("EMPLOYEES", @RECORD, 2, "X")or, to make it easier to read, this also gives me the same problem:
First=Xlate("EMPLOYEES", @RECORD, 1, "X") Second=Xlate("EMPLOYEES", @RECORD, 2, "X") @ANS=First:" ":SecondClones=str( Value:@VM, Count ) Clones-1, 1='
Believe it or not, very shortly after I posted my message this was the exact method I used to make it work. I just kept assuming there was another "cleaner" approach.
Thanks,