I have a custom action configured as "Display

ux
(Dâmaso Saraiva) #1

I have a custom action configured as “Display overlay” that I would like to have displayed over a map view.

Currently it does display in the detail view, but not over the map alongside the standard “Add”.

Ideally it would be other way around, only display over the map view, and not in other views, but showing up on the map would be a start.

Tips?

(Dinh Nguyen Nguyen) #2

@Filipe_Damaso_Saraiv Is the action you’re trying to display in the map a row-level action? You can check this by looking at the action type drop-down. Row-level actions apply to individual rows, and might depend on row-specific data to function (for instance, if the action modifies column data, or if it uses column data to construct navigation URL).

A map view consists of data from multiple rows (it displays multiple locations from multiple rows). Thus row-level actions cannot be displayed in a map view. For instance, if the action modified a particular column, and the action was visible in a map view, what would the effect of clicking on the action be? Would it modify the column of an arbitrary row in the map, or would it modify all rows in the map?

Currently, only add row action and export to CSV action are not row-level actions, and thus can be displayed in map views.

(Dâmaso Saraiva) #3

Hi @Harry, screenshot below. Key points: - The action is set to “execute an action on a set of rows”. - The map is drawing data from a slice. - The referenced rows in the action have the same criteria as the slice, so all items displayed on the map are intended to be affected by the action I want to overlay on the map.

The use case is that I have a table of deliveries, and a slice for the deliveries of the current week, out of which I draw a map. I want to have a button overlaid on top of that map which marks all current week’s deliveries as being en route.

(Dinh Nguyen Nguyen) #4

@Filipe_Damaso_Saraiv Hi Filipe, I’m afraid an action to execute another action on a set of rows is still a row level action. A quick way to see this is to look at the “For a record of this table” setting. This setting means that this action is still tied to individual records in a particular table. This is also why you can use row data from this table in other action settings such as the referenced rows setting as shown in the screenshot. As I have mentioned earlier, only add row action and export to CSV action are table level actions right now.

(Dâmaso Saraiva) #5

@Harry And focusing on the mentioned use case, can you think of a workaround to achieve the end result, excluding using a dashboard with the intended action on another view?

(Dinh Nguyen Nguyen) #6

@Filipe_Damaso_Saraiv You may want to set up a new table containing a single row, and the data in this row can be selected/modified by the app user to change the filtering of the map locations in the slice. The action can then be tied to the row in this table. When the user wants to execute the action for a particular set of map locations, they’ll need to open this row and click on the action button. If they want to execute the action for a different set of locations, they’ll need to change the values in this row accordingly to change how the locations are filtered, and then they can click on the action button. I don’t know the details of the app so I’ll leave the implementation to you.