Options

Getting problem while comparing filter value -- HELP !!!!

jyotsnasjyotsnas Member Posts: 62
edited 2003-01-14 in Navision Attain
Hi All,

i am developing an utility that takes budget filter as one of the inputs. Its not mandatory for user to enter it. Thats why i want to take out minimum and maximum of the range entered only if Budget Filter is not empty. For this I have written this code

Budget Filter is a table filter

if "Budget Filter" <> '' then begin
StartBudget := GETRANGEMIN( "Budget Filter" );
EndBudget := GETRANGEMIN( "Budget Filter" );
end;

But if if i enter something for the Budget Filter, its comparing it with blank and skipping the code written inside the if statement.

F1 F1 F1 (Help me Please) .... waiting for replies :roll:

Jyotsna Sonawane
______Doubt is the father of Invension_______

Comments

  • Options
    Torben_R.Torben_R. Member Posts: 99
    Did you copy the Budgetfilter into a variable first

    ex.

    Variabel: GlBudgetFilter Text 80

    GLBudgetFilter := "G/L Account".GETFILTER("Budget Filter");

    IF GlBudgetFilter <> '' THEN BEGIN
    Startbudget := GETRANGEMIN(GlBudgetFilter);
    Endbudget := GETRANGEMAX(GlBudgetFilter);
    END;
  • Options
    jyotsnasjyotsnas Member Posts: 62
    Thanks for your reply ....

    But for the code that is given i am getting an error for GLBudgetFilter is not part of the table. Its an external variable. And GETRANGEMIN and GETRANGEMAX are functions related to record variables.

    Anyways, i tried it using one variable

    BudgetFilter text 80

    // consider "Budget Filter" of Rec
    BudgetFilter := GetFilter( "Budget Filter" );

    if BudgetFilter <> '' then begin
    StartBudget := GETRANGEMIN( "Budget Filter" );
    EndBudget := GETRANGEMAX( "Budget Filter" );
    end;

    still not working....... Please reply back :cry:
    ______Doubt is the father of Invension_______
  • Options
    jyotsnasjyotsnas Member Posts: 62
    Thanks A LOT

    my mistake ---- for the previous mail :oops:

    i got it using your solution

    THANKS :):lol: :P
    ______Doubt is the father of Invension_______
Sign In or Register to comment.