FLOWFIELD to values in a range

jensthomsenjensthomsen Member Posts: 173
Not a very good subject, but I didn't know how else to describe it...

I have a table with these fields: JobNo.,Date,Quantity

Here are some test-data:

JobNo. Date Quantity
10 5
10 010108 10
10 150108 20
10 200108 30

Is it possible to create a flowfield on the Job-table (167) that returns these quantities:
IF date is less than 010108 : Quantity = 5
If date is between 010108 and 140108 : Quantity = 10
If date is between 150108 and 190108 : Quantity = 20
If date is larger or equal to 200108 : Quantity = 30

Currently I have created a function which gives me the right value of Quantity.

Comments

  • JedrzejTJedrzejT Member Posts: 267
    You have to:

    create key on yours table

    "job no.","date" and add "sumindexfield" - Quantity


    Now in Job you create field that count quantity based on flowfilter "Date filter"

    Method - sum
    Table - Your table
    Field - quatity
    Filter - Job No. = field - No.
    and Date = field - "Date filter"

    Default this field returns you all quatity but when you set flowfilter (your 4 example) for "date filter" field on table Job then quantity in flowfield will change

    Regards
  • jensthomsenjensthomsen Member Posts: 173
    JedrzejT wrote:
    You have to:

    create key on yours table

    "job no.","date" and add "sumindexfield" - Quantity


    Now in Job you create field that count quantity based on flowfilter "Date filter"

    Method - sum
    Table - Your table
    Field - quatity
    Filter - Job No. = field - No.
    and Date = field - "Date filter"

    Default this field returns you all quatity but when you set flowfilter (your 4 example) for "date filter" field on table Job then quantity in flowfield will change

    Regards

    Not quite good enough...Setting the flowfilter to 020108 will result in 0 i with your solution, but I want to return 10.
  • ufukufuk Member Posts: 514
    Set flowfilter as range: ..020108
    Ufuk Asci
    Pargesoft
Sign In or Register to comment.