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.

Filtering portal with multiple radio buttons

Featured Replies

  • Newbies

Hi

I have a portal on my Overview layout showing records from a Quotes database that I'd like to filter with a series of 5 radio buttons: Faxed, Emailed, Approved, Requoted and Abandoned.

Each radio button has three states--'Yes', 'No' and 'Don't Care'--which indicate how you want the filter to work.

For example, if I have Approved as 'Yes", and all others as 'No', the portal will show those Quotes that are *only* Approved, but have No values for all the other entries; whereas if Approved is 'Yes' and all the others are set to 'Don't Care', the portal will show Quotes that are *only* Approved plus Quotes that are Approved and Emailed, Approved and Faxed, Approved and Faxed and Emailed, and so on. This way I can filter records to find most (all?) combinations of states.

I figure I need a multiline key of some sort, but I'm having difficulty with the logic of the calculation to create it.

If I was doing this in another scripting language I'd be looking at bitmasks and/or sequential queries on found sets.

I also think the probable answer lies with some sort of recursive custom function, but I'm struggling to see how.

Anybody on the forums had to do anything similar before, who could give me some pointers?

TIA

Andy W

Edited by Guest

Perhaps this can get you started.

  • Author
  • Newbies

Michael

Thanks, but I'd already found that thread and--while it gets me towards a solution structurally--my issue is with how to build the multiline key that is used to drive the portal.

Where my requirements differ from the examples shown there (and elsewhere I've managed to find) is that it is using two states for each filter ('Yes' and 'No'), rather than three ('Yes', 'No' and 'Don't care').

Using the example file in that thread you kindly pointed out, there is no way to filter so as to show those records that have Blue and Green *only* (no Red); if you click the Blue and Green boxes in its current form, you get results that have Blue and/or Green, irrespective of the status of the Red, or whether the Blue is the sole positive, the Green is the sole positive, and so on.

I need to be able to exclude values at the same time as including them; in effect, create fairly complicated Boolean search queries.

Using a normal Filemake search, I'd be using '@' to indicate those values that can be '1' or '0' (i.e. 'Don't Care'), at the same time I'm searching for definite '1's' and '0's'.

Am I making sense?

there is no way to filter so as to show those records that have Blue and Green *only* (no Red)

Not exactly - that's what the MatchAll field/button does.

Anyway, I don't think that structure will suit you. If I understand this correctly, in order to anticipate all possible combinations of the filter, the match field would have to contain 3^5 separate lines.

I suppose such key would be possible to generate using a custom function or a repeating calculation field, but I believe there is a simpler way.

MultiMatch.fp7.zip

  • Author
  • Newbies

Shiny!

That looks like it does the trick Michael; many thanks.

Actually, 2^5 should be enough, so that doesn't seem too bad. Not too difficult to make with a repeating field, either.

I have included the other method as well, for comparison.

MultiMatchX2.fp7.zip

  • Author
  • Newbies

Michael

Interesting...

The second method is kinda like the approach I was trying to get with bitmasks. Going to have to read up on those functions and figure out if I can abstract the methods to work in multiple portals in the solution.

With your experience, which method do you think would be fastest with a lot of records?

Thanks again.

I really don't know. Offhand, I'd say a single field relationship should be faster than a compounded one - but that's pure guessing.

If it gets slow, I would experiment with converting the keys to decimal numbers - but again, I don't know if that would help.

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.