Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

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" THEN
  IF INV_NO1,2=JR" THEN
    @ANS=Credit Note"
  END ELSE
    @ANS=Journal"
  END
END ELSE
  IF INV_NO1,2=DJ" THEN
    @ANS=Debtor Journal"
  END ELSE
    IF INV_NO1,1=D" THEN
      @ANS=Deposit"
    END ELSE
      @ANS=Exchange"
    END
  END
  IF INV_NO1,2=RD" THEN
    @ANS=Refund"
  END
END

END

www.partsconnection.com.au_aden_oi.jpg

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.

[email protected]

SRP Computer Solutions, Inc.


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.

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/1c084b026812efb385256e0000244192.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1