How to remove add new button from within a form?

Hy,

I have a form (reference view) for adding new projects in a task management app.
In the form, when selecting the responsible person for the new project, there is a dropdown list with the names and pictures of the team. But there is also the possibility (action button) to add a new member of the team from here.

How can I make that button go away?
(or bonus - How can I make that button go away if the user is not admin?)

I want to remove it because I have a different form for adding new team members and I donโ€™t want users to accidentally add new users when filling up the form for new projects.
( the app is not in english, but I hope thatโ€™s not an issue for helping me find the settings to remove the button )

Thank you

Solved Solved
0 9 5,387
1 ACCEPTED SOLUTION

I guess I could make a second table as a reference to the โ€œResponsabilโ€ table and use it only for this view and make it read only for everybody, and then use the initial โ€œRespnsabilโ€ table on the other view where I want the admin to be able to make changes and there use the expression you mentionedโ€ฆIs this the cleanest way?

View solution in original post

9 REPLIES 9

Hi @sorin_mihai, welcome! This article about the USERROLE() expression may be a helpful place to start - the first example it gives highlights how you specific user levels can be defined for allowing updates to a table (look for the โ€˜Are Updates Allowedโ€™ field in each table): https://help.appsheet.com/en/articles/2357273-userrole

Hy, yes that is close. But this makes the rule for this table apply everywhere the table is referenced.

But I want it just for this view to not have the possibility to add a new team member. In this view, the dropdown should only be used to select one of the members as a Responsabil, not to create new ones. However, in a different view, the option to add new members must be open. Any way to control that Add New button, locally inside a view?

I guess I could make a second table as a reference to the โ€œResponsabilโ€ table and use it only for this view and make it read only for everybody, and then use the initial โ€œRespnsabilโ€ table on the other view where I want the admin to be able to make changes and there use the expression you mentionedโ€ฆIs this the cleanest way?

@sorin_mihai Here is another workaround. In fact itโ€™s just a fake

In the UX --> Localize go to โ€œNewโ€ and enter an expression like:
IF(CONTEXT("View") = "Adaugare Project" , "" , "New")))

This would hide the word โ€œNewโ€ in this particular view.

Interesting, good to know the mechanism, but itโ€™s not of use for this particular application as I need the button to go away, not the word NEW

I would do the method of creating a slice to handle this, by creating a slice and setting the update permissions thereโ€ฆ All of the mechanisms throughout app sheet are affected all at once and no need to go through an individually configure everything.

@Fabian the problem you might find here is that the Localize text is only calculated at certain times in the app - itโ€™s not 100% dynamic. Another option would be to control the New buttonโ€™s visibility by changing the action that controlโ€™s it.

Fabianโ€™s idea of using the CONTEXT() formula is a good one, just not used in the Localize space.

If you put Fabianโ€™s formula in the condition for the add action of the table, that should give you contextual control over the add action and by specifying the view you wish the action to be available in it should give you the ability to show it where you want.


Hereโ€™s a link to another article where we discussed how to affect the NEW button in length.

MultiTech
Participant V

Another option could be to create your own user class system: you can find more on this thread.

Thatโ€™s really good to know thanks for pointing it out.

Steve
Participant V

The Responsibil column appears to be of type Ref. The presence of the New button in the drop-down menu is determined by the app userโ€™s access to the table or slice the Ref values reference. Therefore, you can remove the New button by removing the userโ€™s permission to add rows to the referenced table or slice.

You can conditionally affect a userโ€™s permissionsโ€“such as only allowing a row add if the user has the role of Adminโ€“with table permissions (the โ€œAre Updates Allowedโ€ @Peter mentioned above; see Controlling Add, Update, and Delete).

Table permissions take effect wherever the table is used, including within slices. Slices, however, can be given their own stricter permissions (see Slices: The Essentials). A slice canโ€™t have its own conditional permissions like a table can, though.

Top Labels in this Space