stefangs Posted March 17, 2019 Posted March 17, 2019 Hi all, In my contacts table, I have a check box field where the user can categorize any contact into three categories that are used in several places throughout the solution. So a contact may be in the 'client' or 'personnel' category. Ideally I would end up with three value lists that can be applied anywhere a contact needs to be entered. For example, when creating an invoice the contacts menu would pop up a list of only those contacts that have the 'client' checkbox set. I keep running into problems with globals not being indexable or the popup list showing the contact ID along with the name which I don't want. So obviously I'm approaching this wrong. Thanks for any help, Stefan
comment Posted March 17, 2019 Posted March 17, 2019 Where exactly do you see globals in this situation? The categories of a contact are property of contact, so this certainly cannot be a global field. And if you only ever want to see clients from Invoices, why would you use a global for this? Now, you could use a global field to select the category for the value list. But then you would have to populate it with "Client" before trying to use the value list from Invoices. OTOH, you would only need one value list, not three - see the attached demo. GlobalCategoryVL.fmp12 1
stefangs Posted March 17, 2019 Author Posted March 17, 2019 Thanks for the demo. This works well, but of course it's not elegant having to select 'client' in a (to the user) unnecessary field before you can select a client. This is the complicated I tried. This worked sort of, but not when I asked to sort the value list by the second field and not show the first field in the 'Manage ValueLists' dialog. - Checking a category in the contacts table populates a calculation field with the category ID (I suppose this could also be literal text instead). Say clients are ID 1. So you check 'client', then that field contains 1. - A different table has globals for each category. The globals contain ID numbers, like 1=client, 2=staff. Create a relationship from each of these globals to the category field in contacts. - Create a value list for each category (all work the same, but have a different category). - Put contact ID field for the required category (e.g. clients) on the layout to popup a list of all clients, but don't show the IDs, only the names. - Overlay this field with a non-editable field of the client name.
comment Posted March 17, 2019 Posted March 17, 2019 55 minutes ago, stefangs said: This works well, but of course it's not elegant having to select 'client' in a (to the user) unnecessary field before you can select a client. Well, it's a demo. In the real implementation, you can select the type for the user beforehand - e.g.by a script triggered on OnLayoutEnter - and hide this from the user. 1
stefangs Posted March 17, 2019 Author Posted March 17, 2019 Ah yes, that sounds simple enough. Thanks!
Recommended Posts
This topic is 2088 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 accountSign in
Already have an account? Sign in here.
Sign In Now