[Form]How to add a column to show description(other table)

gisongison Member Posts: 128
Hello all,

I want to modify [Form]"Sales Order SubForm", to add a column next to the "Location Code" column. This new column show the Name of "Location Code" in the form.

I tried to declare a record variable with subtype: "Location", but I don't know how to match with sales order line... I mean like SQL statement's WHERE condition...does anyone know that?

Comments

  • sendohsendoh Member Posts: 207
    add this function

    declaration :
    var datatype subtype
    recLLocation record Location


    GetLocationName(parLocCode:code[10]) : Text[50]

    if recLLocation.get(parlocCode) then
    exit(recLLoction.Name);

    1. DropDown the textbox in the tablebox
    2. go to properties of the textbox and then type
    this in the sourceexpr gelocationcode("Location Code")
    Sendoh
    be smart before being a clever.
  • gisongison Member Posts: 128
    I'm deeply appreciated your help.
    :?
  • SavatageSavatage Member Posts: 7,142
    By using a flowfield you can have the value fill in after you go to the next line. (you can try to see if what you want.)

    Add 1 field to the Sales Line Table.

    FieldName= Location Name
    Type= Text
    Size= 30


    View the properties of the newly created field then
    FieldClass= FlowField
    CalcFormula= Lookup(Location.Name WHERE(Code=FIELD(Location Code)))


    Now go to the Sales Order Subform drop in Location Name on the Sales line.

    When you enter an item and hit enter it will show the location name.
  • gisongison Member Posts: 128
    Thank you... it's another good idea. :o
Sign In or Register to comment.