Options

Table Filtering without Coding

narinari Member Posts: 16
edited 2011-12-15 in NAV Three Tier
hi everyone

now, im triying to set Table Filter in table relation property(Table 37 Sales Line) without using any Codes.
the reason why i cannot use code is, when i write codes(such as, SETFILTER and SETRANGE) in Onlookup trigger, Table Relation dont work.(i dont knowv the reson but no response. )
So i decided not to use Code and solve this issue by setting Table Filter(in properties.)
However, when i try to put range filter(something like ORDER DATE>TODAY) , it will not work.
Does anyone know how to do this?

im waiting for your reply

thanks.

nari

Comments

  • Options
    mohana_cse06mohana_cse06 Member Posts: 5,503
  • Options
    Troubles_In_ParadiseTroubles_In_Paradise Member Posts: 588
    nari wrote:
    hi everyone

    now, im triying to set Table Filter in table relation property(Table 37 Sales Line) without using any Codes.
    the reason why i cannot use code is, when i write codes(such as, SETFILTER and SETRANGE) in Onlookup trigger, Table Relation dont work.(i dont knowv the reson but no response. )
    So i decided not to use Code and solve this issue by setting Table Filter(in properties.)
    However, when i try to put range filter(something like ORDER DATE>TODAY) , it will not work.
    Does anyone know how to do this?

    im waiting for your reply

    thanks.

    nari

    maybe, you could try, for field Order Date, to set filter:
    Workdate..
    
    ~Rik~
    It works as expected... More or Less...
  • Options
    narinari Member Posts: 16
    well

    i made new table(call A)and make relation to Sales Line by using table relation.
    A is something like Price List and it also has Starting Date and Ending Date.
    A's original field required to be in the Sales Line and it needs to be lookedup when you select that original field.
    However, when you select that original field, it has to be filtered by Date(A:Ending Date>Sales Line:Order Date)

    that is the problem
  • Options
    narinari Member Posts: 16
    What i wrote in Sales Line Original field is....

    "Table A"."Original Field" WHERE (Customer No.=FIELD(Sell-to Customer No.),Item No.=FIELD(No.))

    I would like to add is something like....

    "Table A"."Original Field" WHERE (Customer No.=FIELD(Sell-to Customer No.),Item No.=FIELD(No.), Ending Date >FIELD(Order Date))

    please help me
  • Options
    mohana_cse06mohana_cse06 Member Posts: 5,503
    i guess the only way we have is through coding..
  • Options
    thmartinthmartin Member Posts: 90
    As soon as you put code in the OnLookup trigger you overwrite the standard behaviour.
    In your case you need additionally to the filter setting the coding of opening the lookup form and picking the value.
    For an example look at the OnLookup trigger of field "Primary Contact No." in the Customer table.
    Thomas Martin
    NAV Developer
  • Options
    pdjpdj Member Posts: 643
    The described request can be solved by a FlowFilter. Make a new field in table A called "Order Date Filter" (FieldClass=Flowfilter). Then set the filter you like in the OnOpenForm or maybe OnAfterGetRecords. Finally you can use the flowfilter in the TabelRelation like a normal field.

    But your description is quite strange it doesn't make any sense to me, so I hope I misunderstand it... :?

    But take a look in the on-line help regarding FlowFilters - a lot of people never use them, and you might find a way to solve it.
    Regards
    Peter
  • Options
    narinari Member Posts: 16
    thmartin wrote:
    As soon as you put code in the OnLookup trigger you overwrite the standard behaviour.
    In your case you need additionally to the filter setting the coding of opening the lookup form and picking the value.
    For an example look at the OnLookup trigger of field "Primary Contact No." in the Customer table.

    Finally Ive got answer! thank you so much!
    But, i have another question.
    i looked up "Primary Contact No." in the Customer table but it did not work in Table itself.However, in the Customer Form, I could looked up "Primary Contact No.".
    Why this happens?
    Does anyone know why it is happen?
  • Options
    narinari Member Posts: 16
    pdj wrote:
    The described request can be solved by a FlowFilter. Make a new field in table A called "Order Date Filter" (FieldClass=Flowfilter). Then set the filter you like in the OnOpenForm or maybe OnAfterGetRecords. Finally you can use the flowfilter in the TabelRelation like a normal field.

    But your description is quite strange it doesn't make any sense to me, so I hope I misunderstand it... :?

    But take a look in the on-line help regarding FlowFilters - a lot of people never use them, and you might find a way to solve it.

    oh mine. I think it is great idea too. i will try in the next time! thank you so much!
    =D>
Sign In or Register to comment.