Popup menu items

Very much a newbie here. How can I make a Popup Menu that gets its items from another PanX database?

Your question is a bit open ended for a specific answer, but let me give you some hints, and if you need more detail, hopefully you’ll be able to refine your question.

The most common way to create a popup menu on a form is with a pop-up menu object. The default for this object is a fixed list of items. If you want a dynamic list of items, you’ll have to switch from Literal to Formula mode. See Dynamic Popup Menus on this page to learn about this mode.

With a formula, there are a number of ways to grab data from another database, including arraybuild(, lookupall( and fieldvalue(. Which one you use depends on how the information is arranged in the other database, and what items you want in the menu. Since you probably don’t want duplicate items in your menu, you’ll probably also want to use the arraydeduplicate( function.

Suppose you have a Mailing List database with a City field, and in another database you want a pop up menu that lists ALL of the cities in the Mailing List City field. Here is the formula you would use.

arraydeduplicate(arraybuild(cr(),"Mailing List",{City}),cr())

Now suppose you want the pop-up menu to only list cities within 25 miles of the 92648 zip code. Here’s how the formula would be modified.

arraydeduplicate(arraybuild(cr(),"Mailing List",{City},{zipdistance(Zip,92648)<25}),cr())

In addition to using a pop-up menu object, it is also possible to use a program to create a pop-up menu on the fly. If you do that, you can use any program you want to generate the menu items.

You can use a similar technique to create a pop-up menu in the data sheet, see Running Code when a Field is Clicked on this page:

I realize all of this information will probably prompt many more questions, but hopefully it will provide a bit of a starting point.

Well, I’m trying to setup a sports database for a pool league. I have a database with 162 players in it. The fields are: First Name, Last Name, Address, City, Postal Code, Email Address, Phone, and Team Name. I want to use a form for data entry, and on that form I want to have a popup menu for Team Name that gets its choices from another database called Teams. The Teams db has three fields: Team Name, Short Team Name, and Sponsor. I have spent a lot of time going thru the help system and watching videos looking for how to accomplish this task. No success as of yet. Thanks in advance for your help.

Ok, so you just want the popup menu to list all of the teams? And it sounds like each team will only appear once in the Teams database, so no deduplication is required. Here is the formula that should do that:

arraybuild(cr(),"Teams",{«Team Name»})

Here’s the help page for arraybuild(

You have to put the « and » around the Team Name field because of the space in the field name. In general, life is a bit simpler if you don’t use spaces or other punctuation in field names. It’s not the end of the world, but when you do, you have to remember to put the chevrons around the name when you use that field in a formula. This help page discusses this:

Thanks, Jim. That is perfect.

I’m starting to see some good potential for this program, lol