Jump to content
Sign in to follow this  
Kevin12853

Filtering TableData

Recommended Posts

Hi

I'm sure this is very simple to achieve but i cant find a solution. I am learning FMP with a view to dumping MS Access so i am trying to recreate an Acces DB in FMP.

What I want to do is filter a record set on the contents of a field then use that record set to populate a dropdown list.

I have a table containing account details which includes the account type eg

Debit

Credit

Cash

Bank

Equity

etc.

I have a table which holds transaction details and a layout for the entering of those details.

On the layout are 2 dropdown lists one for where the payment was made to (credit) and a dropdown list for where the payment came from (debit).

How do I limit the values shown in the credit dropdown to be only those records from the Account table which an account type of Credit and limit the values in the Debit dropdown to only those records which have an account type of Debit.

In Access I would set the record source of the list to a query but I cant see any similar process in FMP.

Many thanks

Share this post


Link to post
Share on other sites

OK

I dont think this is quite what I'm after

Eveything i have found so far appears to be limiting the values returned according to a selection made in another field, using relationships and self joins etc. That is not what I'm after. I want the list of values presented in the drop down to be hardcoded if you like, that is the criteria is hardcoded not the list of results.

I have a table containing for example...

Account Name Account Type

Account1 Credit

Account2 Credit

Account3 Debit

Account4 Debit

I want a dropdown list to show only Credit Accounts ie Account1 and Account2 without the user typing anything. So the criteria is 'Credit'.

in the other dropdown the criteria would be 'Debit'.

Hope this makes sense

Many thanks

Share this post


Link to post
Share on other sites

Instead of using a value that is chosen, to use as the originating side of the relational filter, create calculation fields, result Text, with the text that you want to use. That is, a calculation with the result, "Credit". Another with the result "Debit". Then create a relationship from each to the table where the Accounts are. It could also be a self-relationship, ie., from the Accounts table to itself, with the above fields on the originating side of the relationship.

Normally I would set the Storage to "Do not store." But if you want to Find in a portal based on these relationships, then you wouldn't make the fields unstored. Showing the records in separate portals would another use of such relationships.

But we don't really know what you want to use the drop-down for, nor where exactly you are when you want to see it. So we can't really say.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

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