September 14, 20178 yr Hi Everyone Can someone tell me if this is possible? I have a dashboard which displays services due, services outstanding, completed services and faults outstanding. What I want to do is put a little "badge" on the buttons displaying the amount of records showing in the portal related. I have no idea where to start. I have attached some images and also my relationship view. Thanks in advanced!
September 14, 20178 yr You can merge a calculation field within the button text. Therefore the real question is whether a calculation field can determine the number of records shown in a portal. I suspect your portals are filtered, so it's difficult to answer without seeing the filtering expressions. If they're not, it's a simple matter of = Count ( PortalTO::MatchField ). Edited September 14, 20178 yr by comment
September 14, 20178 yr Author Hi thanks for the reply, where would I create this calculation field. My portals are filtered please see below Service Info Portal::Service Complete = "Yes" and Month ( Service Info Portal::Next Service Date ) = Month ( Get (CurrentDate )) and Year ( Service Info Portal::Next Service Date ) = Year ( Get (CurrentDate ))
September 14, 20178 yr The calculation field would be in the dashboard table. However, such calculation field cannot duplicate your filtering expression. How about a different strategy: define a summary field in the portal table as Count of [ primary key field ]. Merge this field in the button text, and place the entire button within a one-row portal to the same TO, filtered by the same expression. Note that a side effect of this is that the button will disappear if there are no records shown in the portal. Edited September 14, 20178 yr by comment
September 14, 20178 yr Author Hi, I have created a summary field in the services table as you have described, but your next instructions are not very clear to me. I have done it!!! Well done!!! But now I have a white box where as what I wanted was it to blend into the button and I cant colour the portal feild to transparent I've Done it...you are a genius!!! Thank you so much!!!!
September 14, 20178 yr Let me add a general note: Portal filtering is slow - and will get progressively slower as the number of records to filter grows. It is much more efficient to filter the relationship itself. You may think it's not possible because it would require an unstored calculation to serve as the match field on the portal side. However, that is not true: you can define a stored calculation field in the Services table as = Next Service Date - Day ( Next Service Date ) + 1 and use it as the match field opposite an unstored calculation field of = Get (CurrentDate) - Day ( Get (CurrentDate) ) + 1 in the dashboard table, to make only records in the current month related.
February 8, 20196 yr On 9/14/2017 at 6:01 PM, comment said: You can merge a calculation field within the button text. Therefore the real question is whether a calculation field can determine the number of records shown in a portal. I suspect your portals are filtered, so it's difficult to answer without seeing the filtering expressions. If they're not, it's a simple matter of = Count ( PortalTO::MatchField ). is it possible to make global field calculation as get(totalfoundcount) setting for found records
February 8, 20196 yr Such calculation needs to be unstored. Global calculations are stored and will not update when the found set is changed..
Create an account or sign in to comment