Jump to content

Hide calculation on portal field help


This topic is 2237 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

Hi, I am trying to hide a field in a portal using a calculation on the "hide" behaviour.

Based on this article from some versions back - https://www.teamdf.com/blogs/a-very-nice-way-to-format-a-sorted-portal-using-conditional-formatting/. However, I am trying to use Global Variables to achieve this.

In short, my portal has a "category" field whose value is repeated. And I want to "GroupBy" it, and only show the first occurrence of the category and hide the subsequent ones.

<category> <name> <description>

Cat1 ... ...

Cat1 ... ... << Hide Cat1

Cat2 ... ...

Cat2 ... ... << Hide Cat 2


I tried to hide the <category> field using the behaviour with the following calculation:

This = Category::Name ; 
$$Prev = $$NextPrev ;
$$NextPrev = This
] ;
$$Prev = This


I keep $$Prev as the previous category value, so that if the current "This" field is the same, I attempt to hide it.

This will hide all the <category> because presumably $$Prev = This.


However, If I test

a. $$Prev = "Cat1"

b. This = "Cat1" 

"Cat1" gets hidden.

I am just wondering if there's something wrong with my calculation?

Thanks in advance!






Link to comment
Share on other sites

I haven't tested your attempt because IMHO, this method of cascade-overwriting of variables is not robust enough even when implemented "correctly". I would prefer using a calculation field, as shown here:

BTW, the article that you point to does NOT use global variables - and it too requires a calculation field to be defined in the child table.



Edited by comment
Link to comment
Share on other sites

This topic is 2237 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.