Form Functions - CurrForm.<ControlName>.<Function&g

nalineenalinee Member Posts: 55
Hi everybody,

I am using the following syntax : CurrForm."No.".VISIBLE := FALSE;

But instead of using ControlName("No."), I want to use a variable to which "No." will be initialized.

eg. CustNo := "No.";

Can anyone tell me how the field "No." be made invisible by using variable CustNo?

Thx & Rgds

Nalinee

Comments

  • todrotodro Member Posts: 117
    nalinee wrote:
    Hi everybody,

    I am using the following syntax : CurrForm."No.".VISIBLE := FALSE;

    But instead of using ControlName("No."), I want to use a variable to which "No." will be initialized.

    eg. CustNo := "No.";

    Can anyone tell me how the field "No." be made invisible by using variable CustNo?

    Thx & Rgds

    Nalinee
    sorry, that's not possible in Navision :(
    Torsten
    MCP+I, MCSE NT, Navision MCT (2004,2005)
  • nalineenalinee Member Posts: 55
    Can someone help Urgently whether this is possible and easy to implement?

    We need to enable the users to define the fields they want to hide and the form to automatically hide those fields.
  • todrotodro Member Posts: 117
    nalinee wrote:
    Can someone help Urgently whether this is possible and easy to implement?

    We need to enable the users to define the fields they want to hide and the form to automatically hide those fields.
    its possible with a case statement, like the example below, with all the fields which have to be named and hardcoded and based on some criteria you call the function with hide/show.

    You can find an example for this in older navision version, e.g. 3.70B Form 330, when navision was using this for showing/hiding menues. This logic could be slightly modified.
    SetSubMenu(MenuType : Integer;Visible : Boolean)
    CASE MenuType OF
      0:
        CurrForm.Logo.VISIBLE := Visible;
      1:
        CurrForm.GeneralMenu.VISIBLE := Visible;
      2:
        CurrForm.SalesMenu.VISIBLE := Visible;
      3:
        CurrForm.PurchMenu.VISIBLE := Visible;
      4:
        CurrForm.InventoryMenu.VISIBLE := Visible;
      5:
        CurrForm.ResourceMenu.VISIBLE := Visible;
      6:
        CurrForm.JobMenu.VISIBLE := Visible;
      7:
        CurrForm.HumanMenu.VISIBLE := Visible;
      8:
        CurrForm.RMMenu.VISIBLE := Visible;
      9:
        CurrForm.FAMenu.VISIBLE := Visible;
      10:
        CurrForm.MfgMenu.VISIBLE := Visible;
      11:
        CurrForm.CapReqPlanMenu.VISIBLE := Visible;
      12:
        CurrForm.Servicemanagement.VISIBLE := Visible;
      13:
        CurrForm.WarehouseMenu.VISIBLE := Visible;
      14:
        CurrForm.CommercePortalMenu.VISIBLE := Visible;
    END;
    

    So with this background, you could create a setup table where the users could show/hide the fields in specific forms, read the values for the user who opend the form, and then decided which fields to hide.

    Nevertheless, I d not like this idea for normal forms as this will increase support efforts in case users are complaining about things not working and you have to reproduce exactly what they see as the navigation (order) changes moving from one control to the next etc.
    Torsten
    MCP+I, MCSE NT, Navision MCT (2004,2005)
Sign In or Register to comment.