Method Community

 

set value to a field of a new item in a PO

Last post 02-16-2015 8:57 AM by Method_Justin. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 02-11-2015 8:01 PM

    set value to a field of a new item in a PO

    Hi,

    I got a problem that can not set value to a field of a new created item line in a purchase order.

    My scenario is:

    1. I have a "Depot" table, which has a "Location" field (text, unique)

    2. In PurchaseOrderLine, I add a pushdown field "DepotLocation" which points to "Location" field of "Depot" table.

    3. In "PurchaseOrder" Screen, I add a "Vendor Location" textbox. (this textbox will display "City" value of a Vendor)

    4. In PurchaseOrderLine Grid, I add "DepotLocation" as one column.

    5. What I want is, whenever I add a new item line by clicking "New Line Item...", I can enter value from "Vendor Location" to "DepotLocation" field of the new created item line.

    What I did now is, in "Grid Wizard for "PurchaseOrderLine", Step 6 of 9, for event "Actions After Add", 

    Start Loop through Grid (for only new/modified row)

    Enter value into field on Screen (update "PurchaseOrderLine:DepotLocation by Value from Screen "Vendor Location")

    End loop through Grid

    6. But actually, there is no value add to that field whenever I click "New Line Item..."

    Is there anything wrong with my actions? 

    Thanks.

    Alex

    Chief Architect
    Yi Systems, Inc.
    alexhuang@yisystems.com
    www.yisystems.com blogs.yisystems.com
    Software.Web.Cloud.IT
  • 02-16-2015 8:57 AM In reply to

    Re: set value to a field of a new item in a PO

    Answer

    Hi Alex,

    You'd probably want to put these actions on the Text Change event of your Item dropdown. That way, when you select a line item it will enter the depot location for you.

    Hope this helps.

    - Justin

    Justin Henderiks
    Technical Sales Specialist
    Method Integration Inc.
    Toll Free: 1.888.925.6238
    Local and overseas: 416.847.0400
    Fax: 416.640.6027
    E-mail: j.henderiks@method.me
Page 1 of 1 (2 items)