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.

Featured Replies

Hi all,

I have been staring at this too long and can not quite figure out if it works or not yet. An outside view would be very handy.

Problem:

I want to combine multiple sets of a multiple number of elements such that each new set will always contain at least one element from each of the old sets, and each element from an old set will have at least one instance in a new set where it is the only element present from the old set.

Ok, how about a (semi)practical context:

I want to be able to return multiple multi-criteria sets in a portal at the same time. Say, all Female customers from New Haven and all Web customers from New York. However, I do not know the size of number of the sets beforehand. I know that a different field will be needed for each element of a set, so am already limited by the number of fields that I want to pre-create (In the above example, they would be linked to a Customer Multikey that has Gender, City, State, and Store Location as values).

I designed the attached repeating field method to work with up to 8 elements total, but should work for more as well. The problem is that I am not as comfortable on my combinatorial math as I would like to be - can anyone spot a scenario where it will fail?

Fields:

Set 1-8 (Text)

Filter 1-8 (Stored Calc):)

Let(

    [

        current = 1;

        firstend = Count( Set 1 );

        secondend = firstend + Count( Set 2 );

        thirdend = secondend + Count( Set 3 );

        fourthend = thirdend + Count( Set 4 );

        fifthend = fourthend + Count( Set 5 );

        sixthend = fifthend + Count( Set 6 );

        seventhend = sixthend + Count( Set 7 );

        eighthend = seventhend + Count( Set 3 );

        list = firstend & "¶" & secondend & "¶" & thirdend& "¶" &fourthend& "¶" &fifthend& "¶" &sixthend& "¶" &seventhend& "¶" &eighthend;

        rep = Get( CalculationRepetitionNumber )

    ];

    Case(

        rep = 1;

        Case(

            GetValue( list; rep ) >= current;

            Evaluate( "Set " & rep & "[" & current & "]" );

            Evaluate("Set "&rep&"["&Quote(Mod( current; Evaluate( "Count(Set " & rep & ")" ) ) + 1)&"]")

        );

        GetValue( list; rep ) > GetValue( list; rep - 1 );

        Case(

            GetValue( list; rep ) >= current and current > GetValue( list; rep - 1 );

            Evaluate( "Set " & rep & "[" & current - GetValue( list; rep - 1 ) & "]" );

            Evaluate("Set "&rep&"["&Quote(Mod( current; Evaluate( "Count(Set " & rep & ")" ) ) + 1)&"]")

        )

    )

)

'current' is the only thing that is changed with each filter:

Filter 1: current=1

Filter 2: current=2...

Thanks,

-Raz

Combine.fp7.zip

  • Author

Nevermind-

I just realized that this could be done much easier via each set as a child filter record of a master filter view.

Also- typo above,

eighthend should read:

eighthend = seventhend + Count( Set 8 );

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.