Set Page fields Visible & not Visible during runtime??

VotucVotuc Member Posts: 206
edited 2013-03-25 in NAV Three Tier
Hi,

I know I started a similar post but I don't think I explained my problem in the right words.

I want to know if it is possible to set fields on a PAGE visible and not visible based on the TYPE of record I am viewing. I want to do this while moving through the records by clicking the "next record" action from the action menu.

So: view one type of records.... fields 1-8 visible......move to next record (of different type based on condition) and now set fields 1-8 NOT visible and set fields 9-15 visible instead.

Is this possible?

I tried setting the field visible property to a boolean variable called isvisible. Then under the properties of isvisible, I set "include in dataset" to yes. Then I had a function to test the condition I want and set the variable isvisible to true --- like so:

if condition is met....
isvisible = true;
currPage.update(false);

But it does not work. :( None of the fields visible property changes.

Comments

  • deV.chdeV.ch Member Posts: 543
    Is the version R2? I read about the same problem in R2 here in another thread. It seems like in R2 you can only set visibility on a Group not on a field. I haven't tried it myself but you could try wrap a group around the field and set that ones visibility as a workaround.
  • matttraxmatttrax Member Posts: 2,309
    Votuc wrote:
    I tried setting the field variable to a boolean variable called isvisible. Then under the properties of isvisible, I set "include in dataset" to yes. Then I had a function to test the condition I want and set the variable isvisible to true --- like so:

    if condition is met....
    isvisible = true;
    currPage.update(false);

    But did you actually set the Visible property on each of the text boxes?
  • VotucVotuc Member Posts: 206
    matttrax wrote:

    But did you actually set the Visible property on each of the text boxes?

    Hi, sorry I meant to say I set the field property "visible" as a varible called isvisible instead of true/false. I was using this post as an example: http://www.mibuso.com/forum/viewtopic.php?f=32&t=33236&hilit=visiblE+property+in+RTC
  • BeliasBelias Member Posts: 2,998
    i think the problem is the same as here :-k
    http://www.mibuso.com/forum/viewtopic.php?f=32&t=46037
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • mohana_cse06mohana_cse06 Member Posts: 5,504
    @Votuc:
    As DeV.ch said
    It seems like in R2 you can only set visibility on a Group not on a field.
    the visibility property will work on Groups.

    As per your requirement, set 1-8 fields in Group1 and 9-15 in Group2.

    Create a Boolean(IsgrpVisible) variable and set IncludeInDataset to Yes

    Write IsgrpVisible = (your condition) in OnOpenPage() and OnAfterGetRecord()

    Set Group Visible = IsgrpVisible

    It will work while moving through the records by clicking the "next record" action from the action menu.

    If you want it in field wise in same group, you can assign boolean variable to visible property of field but it will work only you open the Record not while moving through the records by clicking the "next record" action from the action menu.
  • VotucVotuc Member Posts: 206
    Thank you everyone for your suggestions. I will try the group suggestion and report back to this thread.
  • jigneshdhandhajigneshdhandha Member Posts: 41
    Hello Everyone..

    I have created Page With Many Fields.For Some Filter I have to Show only particular Field among all fields in RTC

    I have Created two Function
    1) First Which Hide all Fields.
    2) Second Which Visible Field base on Filter

    I have Created Boolean Variables with "IncludeDataSet = Yes"
    "OnInit" Trigger
    Test1 := True

    OnOpen Trigger
    Test1 := False

    Resource Filter Trigger
    {
    }
    On Resource Trigger I am Passing Value of That Field on this basis i have to show that field

    but This is not Working

    Anyone Can help me

    Thanks.........
  • JAJJAJ Member Posts: 52
    Hello Everyone..

    I have created Page With Many Fields.For Some Filter I have to Show only particular Field among all fields in RTC

    I have Created two Function
    1) First Which Hide all Fields.
    2) Second Which Visible Field base on Filter

    I have Created Boolean Variables with "IncludeDataSet = Yes"
    "OnInit" Trigger
    Test1 := True

    OnOpen Trigger
    Test1 := False

    Resource Filter Trigger
    {
    }
    On Resource Trigger I am Passing Value of That Field on this basis i have to show that field

    but This is not Working

    Anyone Can help me

    Thanks.........

    Hi,

    The Visible property only works in OnOpenPage and OnInit trigger, so after open the page in runtime is not posible to modify the property.
    The properties Enable and Editable works perfectly :thumbsup:

    In Nav 2013 the property Visible works also ok! =D>

    Regargs.
  • jigneshdhandhajigneshdhandha Member Posts: 41
    Thanks JaJ....
  • manivinomanivino Member Posts: 1
    Hi,

    I hope it ll work your condition placed in on after get record and on after get curr record Trigger also.

    I have tried its working perfectly



    Mani.
Sign In or Register to comment.