Skip 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.

Filtered Occurrence

Featured Replies

I have a relationship calc for a portal that will show either all products, or all products pertaining to another drop down of the season I am viewing.

Case ( not IsEmpty ( Settings::gCheckBox ) ; Project::cProductID_ListSeason //occurrence filtered by season selector ; Project::cProductID_ListLocal //all products occurrence )

This all works fine, but I'd like to update the Project::cProductID_ListSeason to also show products that have 0 seasons assigned to them.

My entities are:

Projects <- Products <-> AssignedSeasons <- Seasons

What would be a good approach to gather ProductIDs that contain no SeasonIDs and combine them into the list of products that do have SeasonIDs?

I want to add new products with no season while I'm filtered, then apply the season to them, without have to show all...assign, then filter by season again. Hope that makes sense :angel:

Edited by shredded

Hi Shredded,

 

One option would be to add another field as a check or radio button to the layout to determine whether you want to see the 0 seasons or not and refine you calculation field based on this newly added field.

 

I hope this would help.

 

Regards,

  • Author

This is what I did that seems to work fine. The only thing is that Im listing a lot of values, even though the relationship filters the correct ProductIDs. Would there be a performance increase if the calculation also determined the relationship, rather than through a table connection? If so, how can I also include Products::_fkParentID to Parent::__ParentID

Let(
    [
        KeyA = SettingsGlobal::gSelect_Season;
        KeyB = GetValue( Products::gSeasonSelectKey; 3 );
        KeyC = GetValue( Products::gSeasonSelectKey; 4 )
    ];
    If(
        not IsEmpty( SettingsGlobal::gSelect_ShowCurrentChoice );
        Case(
            not PatternCount( SettingsGlobal::gSelect_Season; "Collection" );
            ExecuteSQL(
                "SELECT \"__ProductID\" FROM Products WHERE cSeasonStart = ? OR cSeasonStart IS NULL";
                "";
                "";
                KeyA
            );
            PatternCount( SettingsGlobal::gSelect_Season; "Collection" );
            ExecuteSQL(
                "SELECT \"__ProductID\" FROM Products WHERE cSeasonStart = ? OR cSeasonStart = ? OR cSeasonStart IS NULL";
                "";
                "";
                KeyC;
                KeyB
            );
        );
        ExecuteSQL( "SELECT \"__ProductID\" FROM Products "; ""; "" )
    )
)

 

Edited by Lee Smith
formatted the calc

As of my knowledge, working through relationship has less negative impact on the performance than calculation fields.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.