Expression and/or table set up issues - trying to have user choose map values per button

I am not sure exactly what to do here. I found a sample app (inventory management) to help me but i still cannot figure this out per my app.

I have an app that i want the user to be able to click a button - when they click that button certain locations (LatLong) will be on the map. I have the buttons on the view along with the map.

However, i have two maps in the view (I dont want two - i want one that will change according to the user selection).

In the Map Views (and most views), under the Display section there is a Show If property. You simply need to insert an expression to show the view when the analogous button is selected.

It looks like you are using a Dashboard to glue the buttons and map views together. I have had some issues trying to show/hide views in the past when in a Dashboard…but maybe they have fixed those. I’d give it a try.

Thank you, i will try that…

I created a third table to handle this( is that what i am suppose to do)?

So I have

Table A - location points
Table B - Location Points
Table C - Location points - I need on both sets (Maps) - chosen by the user.
Table D - i built to try and tie the two tables together.

To further help you understand why i did this:

I can easily put two sets of location values on one map. Problem i have - i needed a set of values from one table on the map to overlay with another set of value location points. I had to split up my table - Google has put limits on how many times i can Call my api.

So… I split the table into two tables. But i also have another set of values i need on BOTH maps at all times.

So to clarify - I have a table i had to split - which i want the user to now choose ( Layer 1 and Layer 2). However - the 3rd set of values will stay on the map NO MATTER WHAT the user chooses…

Does anyone know of how i can make this work? Again, I have gone through the example app - but i don’t need all the tables it has, nor is my app the same. I just really need some help on how to make the buttons work for the map.

This is what i have so far. I need the two buttons to change the [trucks] on my map, but keep the [assets] on it no matter which layer is chosen. So if the user clicks on Layer 1 - they will see the first set of trucks along with ALL assets. If the user clicks Layer 2 - they will see the second set of trucks along with ALL assets (same assets seen in Layer 1).

But as you can see - my app shows two maps. I need it to show one.

Did you try using the Show If properties in the Map Views?

And how did you create the Layer1/Layer2 button portion of the view? I’ll try to re-create and help.

1 Like

Thank you very much. This was my Show If -

any(view_criteria[Main_Map_Layer]) = “Layer 1”,
any(view_criteria[Main_Map_Layer]) = “Layer 2”

Here is the Button part i did - i copied from the “inventory management” app - i made adjustments:

I think my problem lies in the referencing of the tables. But i am not really sure…

The Show If in the “Select a Layer” view should be left empty.

The expression above needs to be placed into the Show If of the “Truck Layer #1 and GeoForce Map”

And this expression above needs to be placed into the Show If of the “Truck Layer #2 and GeoForce Map”

Try making those changes first and see if the views hide/show. I’ll wait for your results before I try re-creating.

That worked!!! Thank you VERY much!