Multivalue Symbolic Fields and Edit Tables (OpenInsight 32-Bit)
At 18 DEC 2003 01:36:00AM Aaron Thorp wrote:
I have a payments table that allows invoices to be entered and receipted in an edittable. My problem is that one of the columns is producing a description based on the invoice number in that row of the multivalue columns "DESCRIPTION":
INV_NO={INVOICE_NO}
IF NUM(INV_NO) THEN
IF INV_NO "" THEN @ANS=Invoice"END ELSE
IF INV_NO1,1=J" THENIF INV_NO1,2=JR" THEN@ANS=Credit Note"END ELSE@ANS=Journal"ENDEND ELSEIF INV_NO1,2=DJ" THEN@ANS=Debtor Journal"END ELSEIF INV_NO1,1=D" THEN@ANS=Deposit"END ELSE@ANS=Exchange"ENDENDIF INV_NO1,2=RD" THEN@ANS=Refund"ENDENDEND
While all the other multivalue fields that are displayed are XLATEs, they work, however whenever I get more than one row in the edittable, the description field acts as if there is no invoice number and only displays on one row. What would be the cause of this? Is there any other way of doing this?
At 18 DEC 2003 01:48AM Donald Bakke wrote:
Aaron,
Just a few quick suggestions:
1. Make sure the symbolic field is flagged as multi-valued.
2. Use "@ANS =…" instead of "@ANS =…"
3. Count the number of values in INV_NO and create a loop that populates @ANS for each value.
At 20 DEC 2003 06:12PM David Kafka wrote:
Not sure how this works in an edit table, but I speculate the problem is in your first line. If {InvoiceNumber} is returning as a multivalue, then the test Num(InvoiceNumber) will fail. This will happen if @MV is 0. I can't remember if this might happen in code executed in an edit table. If so, you may need to do something like this:
Save_MV=@MV
@MV=current_row_number_whatever_that_is
InvoiceNumber={InvoiceNumber}
@MV=Save_MV
etc.