Options

Request Options Page control properties

HohenzollernHohenzollern Member Posts: 18
edited 2014-11-11 in NAV Three Tier
Hi there, I have a problem with changing control properties on Request Options Page, NAV 2013.
That is what I am trying to do,as example:
I have a function "UpdatePage", it's executed on OnOpenPage trigger.

Function:
IF AnalyseType = TRUE THEN BEGIN  //AnalyseType - boolean variable
  RequestOptionsPage.Control1.ENABLED(TRUE);
That will work in NAV 2009 but in 2013 I get this - "You have specified unknown variable ENABLED...".

Any ideas what's wrong? Thx.

Comments

  • Options
    mohana_cse06mohana_cse06 Member Posts: 5,504
    Take a global Boolean variable like Control1ENABLED with IncludeDataset property yes.
    IF AnalyseType = TRUE THEN BEGIN  //AnalyseType - boolean variable
      Control1ENABLED := TRUE;
    

    Or simply
    Control1ENABLED := AnalyseType;
    

    and set Control1ENABLED on Enable property of Control1 on request Page.
  • Options
    krikikriki Member, Moderator Posts: 9,096
    [Topic moved from 'NAV/Navision Classic Client' forum to 'NAV Three Tier' forum]
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • Options
    HohenzollernHohenzollern Member Posts: 18
    Thanks, that was really helpfull. I was trying to do in such a way earlier, but forgot to set this:
    IncludeDataset property yes.
  • Options
    raphiraphi Member Posts: 4
    Hello

    I have a similar problem.

    I try to upgrade from 2009 R2 to 2013 SP1/R2 and now I am at the point where I have to import the converted reports.
    After compiling, I got a few errors with unknown variables (p.e. "You have specified an unknown variable. ENABLED Define the variable under 'Global C/AL symbols'."

    So my questions are:

    1. Where do I have to define the variable? At the VAR section in the Report? I cannot find the Global C/AL symbols
    2. How do I write the new code?:
    IF Option = Option::"Update Workbook" THEN BEGIN
            IF NOT ISSERVICETIER THEN BEGIN
              RequestOptionsPage.FileName.ENABLED(TRUE);
              RequestOptionsPage.SheetName.ENABLED(TRUE);
            END;
          END ELSE BEGIN
    

    Best regards
  • Options
    postsauravpostsaurav Member Posts: 708
    HI,
    1. Where do I have to define the variable? At the VAR section in the Report? I cannot find the Global C/AL symbols

    Navigate to View - C/AL Globals to define these Boolean variables.
    2. How do I write the new code?:

    New Code -
    IF Option = Option::"Update Workbook" THEN
     EnableFields := TRUE;
    ELSE BEGIN
    

    Where
    1. EnableFields is of type Boolean, with IncludeInDataset To True.
    2. EnableFields is Set to Enable Property of Fields - Filename & SheetName in Report Request Page.
    (Navigate from View - Request Page)

    Thanks & Regards,
    Saurav Dhyani

    Do you Know this About NAV?


    Connect - Twitter | Facebook | Google + | YouTube

    Follow - Blog | Facebook Page | Google + Page
  • Options
    raphiraphi Member Posts: 4
    Hello

    I cannot see the point View --> "C/AL Globals".

    I am using NAV 2013 SP1.

    I wrote the code in the converted OldBaseVersion_Reports.txt like this:
    REQUESTPAGE
        PROPERTIES
           OnInit=BEGIN
              SheetNameENABLED := TRUE;
              FileNameENABLED := TRUE;
    
    VAR
          FileNameENABLED@19078741 : Boolean INDATASET;
          SheetNameENABLED@19012331 : Boolean INDATASET;
    
    IF Option = Option::"Update Workbook" THEN BEGIN
            IF NOT ISSERVICETIER THEN BEGIN
              FileNameENABLED := TRUE;
              SheetNameENABLED := TRUE;
            END;
    

    After the import, I try to compile the Reports and there is no error. Does it work?

    Can I do that or do I have to change the FileNameENABLED just to FileNameEnable?

    BR
Sign In or Register to comment.