Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to exclude records but keep data in calculations

Featured Replies

  • Newbies

Help. Have written a financial database and need to find a way to eliminate/hide stocks from my portfolio when I have sold all of the shares but need to keep the financials from those stocks for calculations and summaries. Have tried including “archived“ in the key but then becomes cumbersome because I have to include a whole second relationship in each one of my calculations to capture the archived financials. 

It's not quite clear what your question is. Some more details and a practical example would be helpful.

From your last sentence I get the impression that you have some calculations aggregating a related set, and you want to control if the related set includes "archived" records or not. Suppose the related records have an IsArchived field that contains either 0 (False) or 1 (True). In such case you can match this field with a global field on "this" side of the relationship and populate the field ad hoc with either 0 (show only active records) or 1 (show only archived records or both (as a return-separated list) to show the full set.

Another option is to base the calculations on the found set rather than a related set, and perform a find for the records you want to summarize at that moment.

 

Edited by comment

  • Author
  • Newbies

Thanks so much for the reply. Yes, more details. Financial database comprising a found set of currently invested stocks for 4 separate accounts. Each stock entry is related to a library of possible stocks as well as tables for share purchase/sell, dividends and options all related by a calc key of account+stock. When a stock is sold I need a way for it to no longer be displayed in the found set but retain any financials related to that stock, such as share, dividends, options, profit or loss. I basically need to hide those records when they are set to hide/archive , but have the ability to reactivate the stock in the event I want to reinvest in it. I currently have an active/archive field button that appears when share count goes to zero which will exclude that stock from the new found set but of course the financials are also excluded. Thanks 

Unless there is a better solution I have decided that I may just have to sort the records based on an active/archived field where the archived records are at the bottom. If I try to enter a new stock that is archived I can capture a find and reactivate that stock. Not terribly elegant but workable 

I am afraid I am even more confused than before. 

 

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.