Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

  • Newbies
Posted

Hi all, sorry if this is old ground....

Im using fmdev 5.5v1 on windows 98, just so you know.

What Im trying to do is create a value list from a global field. I have a text field called Boys and a global text field called pep_boys, into which I have entered "Manny, Moe, Jack" as the values, separated by returns. The global field has not been configured as "repeating".

When I go to format the Boys field as a pop up menu using values from a field, and I click on pep_boys, I get an error stating that it will not work since pep_boys can not be indexed.

What am I missing? Im certain there's a straighforward way to using global text fields for value lists, but I can't seem to find the recipe (even looking here).

thanks,

-glenn.

Posted

Why not just enter Manny, Moe, Jack as static values for the value list? Globals cannot be indexed and, therefore, cannot be sorted and used for a value list. It doesn't make sense why you'd want to do this anyway, as globals are the same throughout a file, so you'd only have one option in your pop-up menu: Manny

Posted

After some testing, I found my initial presumption to be incorrect. This can work. shocked.gif And this is how: 1. Create a calculation field that is GetField( "yourGlobal" ). 2. Make sure your global has the values you want, and set the calc field as indexed. 3. Create a valuelist based on the calculation field. If your global is never to change, this method works alright. If the global is to change afterward, you'll either have to unstore the calculation and then re-index it or leave the calc as unstored and create another field that looks up the calculation based on a trigger when any record in the file changes.

This will create a valuelist of "Jack

  • Newbies
Posted

Ahh so essentially we're providing an index to the value list.

To answer the previous question: why do this? The answer is for portability. As far as I know, you can't export static VL's, but if the VL was contained in a field, then that field can be dumped along with all the other data. It needs to be a global, 'cause you don't want you values to disappear just because someone deleted a record. By having the VL in a global field, my customer's won't lose their custom values when they upgrade to the latest version of the software. They can just dump from the old version, and re-import their data into the new version and go.

Now if someone has a nifty way that does not involve 3rd party software for how I can dump static VL's and then re-import them, Im all ears. Bonus points if it's scriptable.

thanks,

-glenn.

  • Newbies
Posted

>>1. Create a calculation field that is GetField( "yourGlobal" ). 2. Make sure your global has the values you want, and set the calc field as indexed<<

Under 5.5, this does not work. You can not set the calc field to be indexable since it points to non-indexable (the global) field. Bummer. If anyone has another idea on how to make this work, Id love it.

thanks,

-glenn.

Posted

I think perhaps you forgot to put quotes around the field name. This would mean that the calculation is referencing the field whose name is contained in the global field, which cannot be indexed, because in this case "Manny

Posted

Another technique that is sometimes used is to create a "preferences" file. It's just a regular Filemaker file with a single record in it. You can then create fields in this file that contain various customization data such as valuelists etc. Just put the valuelist data in a regular text field and then use this field as the source for your valuelist in your main file.

This topic is 7780 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
×
×
  • Create New...

Important Information

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