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

Tiger1
Participant V

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).

Solved Solved
0 8 255
1 ACCEPTED SOLUTION

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.

View solution in original post

8 REPLIES 8

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.

Thank you very much. This was my Show If -

or(
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!

Top Labels in this Space