FlowField Filter on another table

lamialamia Member Posts: 22
edited 2012-09-07 in NAV Three Tier
Hello Team,

I have problem with filtering another table on FlowField, I explain :

Count("Sales Cr.Memo Line" WHERE (Sell-to Customer No.=FIELD(No.)))
AND WHERE Location = Location."Use As In-Transit"

How can i do that
plz help

Comments

  • mohana_cse06mohana_cse06 Member Posts: 5,504
    lamia wrote:
    AND WHERE Location = Location."Use As In-Transit"
    what are you expecting from above line?
  • lamialamia Member Posts: 22
    this my filter that i want to use

    Filter on another table (LOCATION)
    how can i make it plz
  • mohana_cse06mohana_cse06 Member Posts: 5,504
    You are adding this FlowFiled in which table?
    What is the datatype of Location field?
  • lamialamia Member Posts: 22
    This field calculate Nbr of "Cr. Memo" how has location used "as in-transit".
    i add this field (flowfield) with Count("Sales Cr.Memo Line" WHERE (Sell-to Customer No.=FIELD(No.))) on table "Customer"
    And i want to add another filter : table (Location) with "Use As In-Transit" = TRUE

    Can i have this filter on the flowfield of table (customer) ?
  • lamialamia Member Posts: 22
    any help?
  • ReinhardReinhard Member Posts: 249
    You have to copy the "In Transit" field from the location to the Credit Memo. (Not sure why you would do that...)
    Then you can do a flowField just like you have, but you can add an additional parameter as "Use As In Transit" = Yes

    - Reinhard
  • lamialamia Member Posts: 22
    thx u lot, but il don't want to add this field
  • lamialamia Member Posts: 22
    i just test this.

    I add field "in transit" in table "cr. memo" and make my flowfield in table "Customer".
    That work, but just for the new cr. memo:
    i explain : when i add this field a add code into "location code = onvalidate", this code get the booleen "in transit" (location") into this new field "in transit" (cr. memo)
  • ReinhardReinhard Member Posts: 249
    yup that's right. now you have to write a short function or report (this will get thrown away afterwards) to update all the old orders.
  • mihail_kolevmihail_kolev Member Posts: 379
    you can also use Lookup flowfield field as filter in another flowfield.
    -Mihail- [MCTS]
  • lamialamia Member Posts: 22
    hoow can i do it?
    Plz can u explain
  • mihail_kolevmihail_kolev Member Posts: 379
    you should create the flowfield in the table (in your case Sales Cr. Memo Line ). Flowfield -
    Name: Loc_InTransit
    
    Lookup(Location."In Transit") WHERE (Code="Location Code")
    

    then you can create another flowfield and use the value of this field
    Count("Sales Cr.Memo Line" WHERE (Sell-to Customer No.=FIELD(No.) AND Loc_InTransit=CONST(Yes)))
    

    Note that this might get slow in some cases. Also you can't use this field for Sum formulas.
    -Mihail- [MCTS]
  • lamialamia Member Posts: 22
    thank you lot
    that's ok
Sign In or Register to comment.