Is there a way to hide field on the fly? Dataport

fmhiguefmhigue Member Posts: 290
I got a Dataport with a requested form, I want to hide fields on the Requested form based on a previous selection.

Customer Type: Customer or Chain or Promo
If I choose Customer I want to hide Chain and Promo fields.

Any ideas?

I tried using VISIBLE but it does not works.

Comments

  • SavatageSavatage Member Posts: 7,142
    Is this an option field?

    Here's a rough thought..
    CASE "Customer Type" OF "Customer Type"::Customer :
    Begin
     CurrForm.ChainFieldNAME.VISIBLE(FALSE);
     CurrForm.PromoFieldNAME.VISIBLE(FALSE);
    end;
    
    CASE "Customer Type" OF "Customer Type"::Chain :
    Begin
     CurrForm.CustomerFieldNAME.VISIBLE(FALSE);
     CurrForm.PromoFieldNAME.VISIBLE(FALSE);
    End;
    
    CASE "Customer Type" OF "Customer Type"::Promo :
    Begin
     CurrForm.ChainFieldNAME.VISIBLE(FALSE);
     CurrForm.CustomerFieldNAME.VISIBLE(FALSE);
    end;
    

    I never tried it on a request form.. :-k
  • DaveTDaveT Member Posts: 1,039
    Hi,

    It works fine on a request form even in a dataport. Don't forget to make the other controls visible if selected :wink:
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
Sign In or Register to comment.