cheerfulzebra Posted September 14, 2017 Posted September 14, 2017 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!
comment Posted September 14, 2017 Posted September 14, 2017 (edited) 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, 2017 by comment
cheerfulzebra Posted September 14, 2017 Author Posted September 14, 2017 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 ))
comment Posted September 14, 2017 Posted September 14, 2017 (edited) 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, 2017 by comment
cheerfulzebra Posted September 14, 2017 Author Posted September 14, 2017 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!!!!
comment Posted September 14, 2017 Posted September 14, 2017 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. 1
Dr.Gopala krishnam raju AMBATI Posted February 8, 2019 Posted February 8, 2019 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
comment Posted February 8, 2019 Posted February 8, 2019 Such calculation needs to be unstored. Global calculations are stored and will not update when the found set is changed..
Recommended Posts
This topic is 2384 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