Jump to content

Filtering portal with multiple radio buttons


creed
 Share

This topic is 5750 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • 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
Link to comment
Share on other sites

  • 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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 5750 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

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