# New action button

**URL:** <https://forum.communityhealthtoolkit.org/t/new-action-button/2087>\
**Category:** Development\
**Created:** [August 8, 2022, 7:01am UTC](https://forum.communityhealthtoolkit.org/t/new-action-button/2087 "2022-08-08T07:01:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cliff](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/cliff/32/1638_2.png) [@cliff](https://forum.communityhealthtoolkit.org/u/cliff)\
**Post date:** [August 8, 2022, 7:01am UTC](https://forum.communityhealthtoolkit.org/t/new-action-button/2087/1 "2022-08-08T07:01:51Z")

</div>

Hello community

Is it possible to change the name of the new action button below dynamically for example when you click on the people tab the new action button has the a different name ie `Resources` and when you click on a particular patient in switches to the default` New action` ? Or it requires a change in the core code base of CHT ?  
 ![Screenshot from 2022-08-08 10-00-41](https://communityhealthtoolkit.b-cdn.net/uploads/default/original/2X/4/44b813d737c90e989e6b3d3031a3bf592dd6aabb.png)

---

<div class="post-metadata">

**Author:** ![jkuester](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/jkuester/32/806_2.png) [@jkuester](https://forum.communityhealthtoolkit.org/u/jkuester)\
**Post date:** [August 8, 2022, 3:04pm UTC](https://forum.communityhealthtoolkit.org/t/new-action-button/2087/2 "2022-08-08T15:04:26Z")

</div>

Short answer is no. I do not think it is currently possible to _dynamically_ change [the label](https://github.com/medic/cht-core/blob/7baac9c39b5bf9b13caf1f03376a6121b6522aa2/ddocs/medic/_attachments/translations/messages-en.properties#L282) on [that button](https://github.com/medic/cht-core/blob/8bca58925d4e09a94d5533d59fcfd974277c9cf5/webapp/src/ts/components/actionbar/actionbar.component.html#L189). (Should, of course, be able to supply a custom translation to _statically_ set the label, but it will not dynamically change based on context.)

I do have a couple of other thoughts. First, it is worth noting that there are some [proposed UI changes](https://forum.communityhealthtoolkit.org/t/updates-to-the-cht-ui-ux/1998) that I believe would impact that button specifically (changing it to just a ➕ button following the standard material design). I am not sure how that might look different on a desktop browser, though.

Also, the idea of adding custom actions to the action bar is the kind of thing that would be really interesting to propose as a use-case for [a plugin/add-on](https://forum.communityhealthtoolkit.org/t/plugins-add-ons-and-extensibility/2068)!

---

<div class="post-metadata">

**Author:** ![cliff](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/cliff/32/1638_2.png) [@cliff](https://forum.communityhealthtoolkit.org/u/cliff)\
**Post date:** [August 8, 2022, 4:28pm UTC](https://forum.communityhealthtoolkit.org/t/new-action-button/2087/3 "2022-08-08T16:28:57Z")

</div>

thanks @jkuester for the detailed response

---

<div class="post-metadata">

**Author:** ![cliff](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/cliff/32/1638_2.png) [@cliff](https://forum.communityhealthtoolkit.org/u/cliff)\
**Post date:** [October 18, 2024, 8:09am UTC](https://forum.communityhealthtoolkit.org/t/new-action-button/2087/4 "2024-10-18T08:09:39Z")

</div>

helo @jkuester @binod

Do we have a New Action for an offline user in 4.x ,

For the admin user it displays properly

 ![Screenshot 2024-10-18 at 11.00.16 AM](https://communityhealthtoolkit.b-cdn.net/uploads/default/original/2X/e/e2d040c7583a7d99fce558b8adce7d762f8163fd.jpeg)

But for a non-admin offline user , when the the button is clicked it just opens the enrollment phone

---

<div class="post-metadata">

**Author:** ![jkuester](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/jkuester/32/806_2.png) [@jkuester](https://forum.communityhealthtoolkit.org/u/jkuester)\
**Post date:** [October 21, 2024, 8:36pm UTC](https://forum.communityhealthtoolkit.org/t/new-action-button/2087/5 "2024-10-21T20:36:37Z")

</div>

Clicking the FAB button for any user should pop a dialog containing all “add” actions that the specific user can perform in the current context. The contents of the dialog can change based on the type/permissions of user and the details of the contact that is currently in context.

I would not expect the dialog to generally be _exactly the same_ for online/offline users since their permissions and the kinds of forms they will have access to will be different. To be clear, though, the actions that a user has access to should not be at all affected by using the FAB button. What ever forms the user could previously access should still be accessible with the updated UI.
