ProMaps

Filters

Can I change the fields ProMaps filters on? (Currently Status and Property Type)

Yes. This is easily done by editing the script "Filters And Headers" in ProMaps.

You'll find a SetVariable line for each filter you have, and you can select which field we search on (a field in the Properties table) and which field acts as the filter (a field in the Interface table). The script is well commented, so read through every line above the comment "You shouldn't have to edit below this line". (My favorite comment in all of scriptdom.)

Note that if you make your own drop down fields for you own filters, you'll want to add the same script triggers we have on ours:

How do I change the value lists used for filters?

You'll notice that there are two value lists for ever filter. For example, there is both a "PropertyStatus" and a "PropertyStatus_Filter" list. Edit the one without "_Filter" in the name. We use the "_Filter" one solely so we can add "All" to the filters when we present them to users.

How can I create my own filters?

In addition to repurposing the filters that come with ProMaps & ProMaps, you can add your own. Let's say you have a field in the properties table called "active" and this contains either "yes" or "no". Here is how you'd add a filter for active:

1. Create a new global field in MapSettings to be used as the filter field--the field users enter their filter criteria into. This will be like the existing SelectStatusGlob field: in our example we'll call it "SelectActiveGlob".
2. If the field you're filtering on has a value list, make a duplicate version of the value list that has "All" as the first option: you'll see value lists like this for status: "PropertyStatusFilter". In our example the new value list is called "PropertyActive_Filter".
3. On the PropertiesMap layout, duplicate the existing SelectStatusGlob field and change the label to "Select Status". Change the field to your newly created SelectActiveGlob field and assign the value list "PropertyActive_Filter" created above.
4. These global filter fields have script triggers on them so be sure your "SelectActiveGlob" field the same triggers as "SelectStatusGlob".
5. Edit the script "Filters And Headers" and follow the comments to add a new variable for your new filter field; again, you can copy what's done for "status" as your pattern. The beginning of the set variable for our new $sc_propertyActive variable looks like this:
Let ([

//The field to search in
sc_field = Properties::Active ;

//The value we are searching on
sc_value = MapSettings::SelectActiveGlob ;

//The value we are using to represent "All"
sc_allString = "All"
The last variable you have to edit is the one $sc_searchFieldString and that will be changed to include our new active filter:
List (
$sc_propertyType ;
$sc_propertyStatus ;
$sc_propertyActive
)
6. Change the script "Load Map Settings" to set your new MapSettings::SelectActiveGlob field to "All" (without a value in that filter no properties will show up) and you're all set! Enjoy!

Can I default the map to show zero properties unless it is fltered?

Yes. This is easily done by editing the script "Filters And Headers" in ProMaps (the mobile file) and is generally a good idea if you have a large data set.

There is a couple of set variable script steps toward the top of the script that helps build the filter queries. They are "$sc_propertyType" and "$sc_propertyStatus". You will need to reference which one (or both) of these filters should be populated before querying for map data. To do this, just wrap the script step where we set the map data package "$$sc_mapDataPackage" in an if/else statement.

The if calculation will read "not IsEmpty ($sc_propertyType) or not IsEmpty($sc_propertyStatus)" without the quotes. Then within the if statement you will run the set variable for "$$sc_mapDataPackage" as it is now. After that add an "Else" statement and within that a script step that sets the variable "$$sc_mapDataPackage" to null / empty using two quotes. That's it... Now pins will only appear on the map when at least one filter is selected.

Can I show a FileMaker found set on the map?

Yes: this is built into ProMaps. If you click on the "List" button in ProMaps you'll see that there's a button on the list view called "Send Found Set To Maps".

(855) SEEDCODE
[email protected]
Follow us: