Written Lookup for a FlowFilter

elmarfvelmarfv Member Posts: 53
edited 2005-04-09 in Navision Attain
Hi all,

I am trying to write a lookup code for a FlowFilter, I am able to retrive the filter i want into a temp Code variable, then i want to try and set the filter. It is not working very well, if i use SetFilter(<FlowFilter>, TempCode); it does set the fitler, but when i press "Ok" on the "FlowFiler" form, it does not set the fitler. if i use MODFY after setting the filter, not conventional, but i thought i should give it a try, it does set the filter, but also gives me the error, Rec.PrimaryKey = '' does not exist.

I am wandering if I should try and use RecordRef?
Elmar F. Vidisson
Certified Navision Attain Developer

Comments

  • jhoekjhoek Member Posts: 216
    What sort of values would "TempCode" typically contain?
    Kind regards,

    Jan Hoek
    Product Developer
    Mprise Products B.V.
  • elmarfvelmarfv Member Posts: 53
    The Client needed the Shortcut Dimensions on the General Ledger Entries. So now they are there. Then he needed the FlowField on the G/L Account to include the new fields, so now they do. Hence I needed a FlowFilter for then ShortCut fields from 3-8. So the return is always a Code, the Dimension Code.

    I found out that FlowFilter lookup does not work unless you have a table in the TableRelations. But you can have a code in the OnLookup anyway.

    I Then tried to use a FlowField to lookup the Dimension codes, into the GL Setup, 3-8. Then use that field as a filter in the TableRelation. but the "FlowField To Dimension Code 3" did not return it when doing the lookup.

    TableRelation := "Dimension Value".Code WHERE (Dimension Code=FIELD(FlowField To Dimension Code 3))

    I ended up having the "Dimension Value" table in the TableRelations, and in the Filter for it, I hardcoded the Dimension Codes. This is not good if they change the Dimension Codes, since this company has not gone live yet.

    TableRelation := "Dimension Value".Code WHERE (Dimension Code=CONST(INC STATUS)).

    Any advice?
    Elmar F. Vidisson
    Certified Navision Attain Developer
Sign In or Register to comment.