Newbies Grouchy Posted May 12, 2016 Newbies Posted May 12, 2016 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: Let([ 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!
comment Posted May 12, 2016 Posted May 12, 2016 (edited) 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:http://fmforums.com/forums/topic/54781-getting-a-value-from-previous-portal-row/#comment-258830 ---ADDED: 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 May 12, 2016 by comment
Newbies Grouchy Posted May 13, 2016 Author Newbies Posted May 13, 2016 Thanks for the tip! I looked at your example, from the link and used a unstored calculation instead. Thanks
Recommended Posts
This topic is 3368 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 accountSign in
Already have an account? Sign in here.
Sign In Now