# Implementing a comment log in a drawer

**URL:** <https://community.appfarm.io/t/implementing-a-comment-log-in-a-drawer/415>\
**Category:** Ask the community\
**Tags:** ui, actions\
**Created:** [April 18, 2023, 11:54am UTC](https://community.appfarm.io/t/implementing-a-comment-log-in-a-drawer/415 "2023-04-18T11:54:40Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jemea](https://avatars.discourse-cdn.com/v4/letter/j/edb3f5/32.png) [@Jemea](https://community.appfarm.io/u/Jemea)\
**Post date:** [April 18, 2023, 11:54am UTC](https://community.appfarm.io/t/implementing-a-comment-log-in-a-drawer/415/1 "2023-04-18T11:54:40Z")

</div>

I am having some trouble implementing a comment log in a drawer. The implementation works in views and dialogs but does not work in drawers (The action on enter does not get triggered in the drawer). Is this a limitation of the drawer or is there another way to go about this?

---

<div class="post-metadata">

**Author:** ![Simona](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/simona/32/201_2.png) [@Simona](https://community.appfarm.io/u/Simona)\
**Post date:** [April 18, 2023, 2:04pm UTC](https://community.appfarm.io/t/implementing-a-comment-log-in-a-drawer/415/2 "2023-04-18T14:04:08Z")

</div>

Hi! Can you please provide more information, maybe with screenshots? Do you mean an action when opening the drawer or an action that is triggered with UI inside the drawer? Can you also provide more information about the action?

---

<div class="post-metadata">

**Author:** ![Jemea](https://avatars.discourse-cdn.com/v4/letter/j/edb3f5/32.png) [@Jemea](https://community.appfarm.io/u/Jemea)\
**Post date:** [April 18, 2023, 2:28pm UTC](https://community.appfarm.io/t/implementing-a-comment-log-in-a-drawer/415/3 "2023-04-18T14:28:40Z")

</div>

We have implemented a responsive drawer which opens from a view. The action which opens the drawer works as it should. In the drawer, we are implementing a comment log. When the user enters some text in the comment log, the action on ‘enter’ which makes the comment visible does not run. This implementation works on other views. It only fails in the drawer

![Skjermbilde 2023-04-18 162252](https://europe1.discourse-cdn.com/flex013/uploads/appfarm/original/1X/a3f007db28aa9fcd192bbf5dc9208b511e6fa0e7.png)

On enter, the text should appear at the level of ‘Message’ but it just disappears

---

<div class="post-metadata">

**Author:** ![Jemea](https://avatars.discourse-cdn.com/v4/letter/j/edb3f5/32.png) [@Jemea](https://community.appfarm.io/u/Jemea)\
**Post date:** [April 18, 2023, 2:39pm UTC](https://community.appfarm.io/t/implementing-a-comment-log-in-a-drawer/415/4 "2023-04-18T14:39:17Z")

</div>

![Skjermbilde 2023-04-18 163643](https://europe1.discourse-cdn.com/flex013/uploads/appfarm/original/1X/e71d38ed0c088e9f1684843bba08bb1b0c684f5d.png)

The messages entered are shown on the logs but they are not displayed

---

<div class="post-metadata">

**Author:** ![Simona](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/simona/32/201_2.png) [@Simona](https://community.appfarm.io/u/Simona)\
**Post date:** [April 19, 2023, 6:50am UTC](https://community.appfarm.io/t/implementing-a-comment-log-in-a-drawer/415/5 "2023-04-19T06:50:34Z")

</div>

Can you please check if you iterate the data source that stores “Message” in the container that holds the text? The container above the text field should repeat content to be able to display something (to have a context), since you might have more than one message stored in the “Message” data source. And if you want to display specific messages you might use the filter, sorting or limit properties.

---

<div class="post-metadata">

**Author:** ![Jemea](https://avatars.discourse-cdn.com/v4/letter/j/edb3f5/32.png) [@Jemea](https://community.appfarm.io/u/Jemea)\
**Post date:** [April 19, 2023, 8:02am UTC](https://community.appfarm.io/t/implementing-a-comment-log-in-a-drawer/415/6 "2023-04-19T08:02:44Z")

</div>

We do iterate the data source that stores the Message. It works when working in a dialog but fails to create the ‘thread collection’ in the drawer so the message entered is not shown. What we will like to know is if this is a limitation of the drawer or there is something we are missing.

 ![MicrosoftTeams-image (8)](https://europe1.discourse-cdn.com/flex013/uploads/appfarm/original/1X/305592ff1a75e460de30b085b0be4cc97225d59c.png)

---

<div class="post-metadata">

**Author:** ![kristian](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/kristian/32/58_2.png) [@kristian](https://community.appfarm.io/u/kristian)\
**Post date:** [April 19, 2023, 9:00am UTC](https://community.appfarm.io/t/implementing-a-comment-log-in-a-drawer/415/7 "2023-04-19T09:00:36Z")

</div>

Hi!

I just tried to copy the whole “Comment log” functionality (container) found [here](https://showroom.appfarm.app/use-cases/comment-log) from a view into a Drawer. Works without any problems. So this is not an issue with the drawer, but probably something incorrect in the modeling/application.

---

<div class="post-metadata">

**Author:** ![kristian](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/kristian/32/58_2.png) [@kristian](https://community.appfarm.io/u/kristian)\
**Post date:** [April 19, 2023, 10:05am UTC](https://community.appfarm.io/t/implementing-a-comment-log-in-a-drawer/415/8 "2023-04-19T10:05:01Z")

</div>

Based on what you write: It sounds like maybe the View has some repeating context (“Thread collection” is repeated and the create new log entry is setting Log Entry.Thread Collection to “Object in contect”. However, if only that button is placed in a drawer instead, that drawer does not have an object in context (the action checks if it is triggered from a repeating UI context).

---

<div class="post-metadata">

**Author:** ![Jemea](https://avatars.discourse-cdn.com/v4/letter/j/edb3f5/32.png) [@Jemea](https://community.appfarm.io/u/Jemea)\
**Post date:** [April 19, 2023, 3:04pm UTC](https://community.appfarm.io/t/implementing-a-comment-log-in-a-drawer/415/9 "2023-04-19T15:04:47Z")

</div>

It works now. Thank you for the help
