Newbies Daveyoneusa Posted January 11, 2014 Newbies Posted January 11, 2014 Hi, thanks in advance for your help. I have learned a great deal on this site.  I have a table of Events. Linked to that table is a table of Expenses. The Expenses portal is inside a tabbed area and works well showing the expenses associated with each event. One of the tabbed portals EXPENSES is filtered to only show expense values above zero so it shows only expenses. The other tab, BALANCE, shows all the expenses and and payments related to the event. If everything has been paid, the total charges are zero  I have a one line portal with a summary field REPORT ANOUNT TOTAL (It's labeled as Expenses that totals the expenses in the filtered or unfiltered portal. I have a field below that field that calculates the event charges per day. SUB_DAY_CHARGES  (It's labeled as Retreat Fee) I have a field below that portal the calculates the # of guest rooms and charges for the rooms. SUB_ROOM_CHARGES (It's labeled as Room CHarges)  I have another one line portal under that that calculates all of the above fields.. TOTAL_CHARGES (It's labeled as total charges)  As long as there are records in the expenses portal, the whole thing works great. If there are no records in the portal for expenses then neither of the one line portals calculates. AS soon as one record shows up on the portal everything is fine. There may be an instance where there are no expenses and only fees so I would like this to be able to work without portal records if necessary.  I tried this for my total_charges field and it didn't make a difference;  If (IsEmpty ( Report Amount Total ) ; Events::sub_day_charges + Events::sub_room_charges ; Report Amount Total + Events::sub_day_charges + Events::sub_room_charges )   Oops, sent the wrong picture. This was before I corrected the calculations. It does accurately calculated with records. but not without.
Agnes Riley Posted January 11, 2014 Posted January 11, 2014 That's just way too many calculations in my opinion. I would script the whole thing when you add expenses or payments. But if you do want to calculate you might want to use the case function and lay your calculation out in a way that's readable. Something like this: Case ( Check if this true ; then do this ; Check if that's true ; then do that) Another thing I recommend is using the Let function. Check that out, it's very useful.
comment Posted January 11, 2014 Posted January 11, 2014 I have another one line portal under that that calculates all of the above fields.. TOTAL_CHARGES (It's labeled as total charges) I can't follow your description. A portal does not calculate anything. Please post the formula behind the TOTAL_CHARGES field, along with an explanation of how each field referenced in the formula is defined. In general, a summary field placed in a filtered portal displays the summary of the filtered related set - but the filtering is applied on presentation level only. If you reference the summary field in a calculation field (in the parent table), it will evaluate as the summary of the entire, unfiltered related set. So the relevance of portal filtering to getting or not getting a result in a calculation field is dubious.
Recommended Posts
This topic is 4026 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