Creating an entry through Maps?

Hello,

I’m having an issue with the Map feature.

I thought I had locked the ability for my drivers to add a new entry on the app but I found out there is actually another way to do this through the map view. As you can see in the photos below, when the driver uses the pin marker on the map, this bottom comes up which allow him to add a new entry.

I am trying to find the hide action that is causing it but I have had no success. How can I get rid of this action?

Thanks for your help :slight_smile:

1 Like

I do not believe we are given access to that action, even in the system generated actions.

However, I believe there is a much simpler solution to your particular use case.

I am certain that I have seen the use of Security Filters to disable certain access capabilities on the table.

So for example, you could set a Security Filter that determined your logged in user is a Driver and then disable Add capabilities throughout the entire app for that user. I have confirmed that disabling Adds does indeed turn of the capability of adding an entry through the map.

Un fortunately, I don’t remember the exact syntax and cannot find the posts I had read in the past.

Maybe someone else can help with the proper expression to use in the Security Filter?

Hmmm… Not security filters, I don’t think. Security filters affect only the visibility of data, but have no inherent affect on actions. Table access controls, though, can restrict access (and thereby disable some actions) based on the current user.

See also:


2 Likes

I have never seen a system generated action that is a check mark, nor one you can’t disable from displaying.

That could be and might explain why I can’t find a post. But I am pretty sure that I have seen expressions written to set a table to read-only upon launch of the app. But I do have pretty vivid dreams! :woozy_face:

1 Like

Right. You do have to be able to SEE the Action to disable it!

I did this…I disabled Adds to my table and took note of the list of Actions for that table. I then turned on Adds. The only additional Action added was the “Add” action (with plus sigh).

Hiding it, does remove the “plus” Add action but you can still place the bouncing Pin and once placed you are given the “Check Mark” action that when tapped allows the entry of a new row with the address pre-filled.

1 Like

That is very odd, I don’t even use maps in my apps so I do not have experience with using them.
That makes it sound more like “bug”/overlooked thing with the add new row for maps.

1 Like

I agree! And even more so now that @Alejandra_Petro has pointed out that this leaves a potential security hole in the apps.

3 Likes

@Alejandra_Petro

Ok. As always, @Steve was right.

While I didn’t find a post, I did find the article (link below) that refers to this capability. And though the article doesn’t explicitly state so, it has to do with setting an expression in the “Are updates allowed?” property of the table definition.

Tapping the filter icon gives you an initial expression to modify but it is my understanding that this can be customized. I suspect that we could also perform a lookup in another table to determine, for example, if the USEREMAIL() is a “Driver”. Though I have not tested that.

I have confirmed the expression will make the table Read_Only.

Before taping the filter icon

After tapping the filter icon

3 Likes

I believe this expression works the same as security filters where it is not a row level filter so lookups will still work.

It looks like the actions shown in your screen shot are a set of “confirm/cancel” actions…

I’m curious how you got to the point where you show in your image, what did it look like before you tapped on whatever action you did to get to the screenshot you shared?


Hmmm… this is a strange one - it’s like there is a companion system generated action that is not shown inside the actions panel. @Adam


Indeed @WillowMobileSystems, if you use a LOOKUP() based on the USEREMAIL(), you can include all sorts of criteria in the “Are updates allowed?” formula.

If you had a column in a Users table, let’s call it (User_Role), you could do the following:

switch(LOOKUP(useremail(), Users, User_Login_Email, User_Role), 
  "Driver", "Read_Only",
  "Admin", "ALL_CHANGES",
"Read_Only")

Setting the edit-permissions on the table level DOES cause the floating pin action to disappear.

4 Likes

On a map where data has Add capability, you are presented the Pin icon indicated in the first image below.

Tapping the icon gives you a bouncing pin on the map that you can drag to a location.

Once dropped, it identifies the address AND provided you the “Check Mark” icon shown above and in the second image below. It is this “Check Mark” icon that @Alejandra_Petro is trying to get access to hide.

Tapping the “Check Mark” icon will open an input Form view for the datasource with the Address column pre-filled by the address from the dropped pin.

Tap “Pin” icon to be able to select an address on the map
Screen Shot 2020-04-24 at 11.12.39 AM

Tap “Check Mark” icon to capture address and pre-fill input Form
Screen Shot 2020-04-24 at 11.13.03 AM

Input Form with address populated automatically
Screen Shot 2020-04-24 at 11.18.41 AM

3 Likes

Thanks for confirming!

2 Likes

Are you able to disable this pin action if that’s the action that leads to this add? I wouldn’t know the purpose of leaving that action if it is only used for adding new locations.

1 Like

Very good question! But alas, it seems we do not have access to that action either!

@Austin_Lambeth if you control the edit permissions directly on the table, and remove the ability to add new records, then yes that action will go away.

But it seems that the actual location adding action is not something that we currently have access too.

Good catch @Alejandra_Petro!

2 Likes

This is a known issue:

That’s why I’m always hiding the “+” Button in map view and only work with the “Pin” Button. Because having 2 Buttons to add a row might be very confusing :slight_smile:

1 Like

Thanks everyone for your help and quick response

@MultiTech_Visions your suggestion has worked for me. Thanks a lot for that. :slight_smile:

4 Likes