# Related data : smart action on all the collection

**URL:** <https://community.forestadmin.com/t/related-data-smart-action-on-all-the-collection/1015>\
**Category:** Help me!\
**Created:** [September 22, 2020, 12:52pm UTC](https://community.forestadmin.com/t/related-data-smart-action-on-all-the-collection/1015 "2020-09-22T12:52:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alaink](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/alaink/32/825_2.png) [@Alaink](https://community.forestadmin.com/u/Alaink)\
**Post date:** [September 22, 2020, 12:52pm UTC](https://community.forestadmin.com/t/related-data-smart-action-on-all-the-collection/1015/1 "2020-09-22T12:52:59Z")

</div>

Hello,

I have the following model in my rails app:

- A campaign has many participations
- A participation belongs to a campaign

I would like to add a smart action in the following view:  
I open a campaign then navigate to all related participations by clicking on `participations` on the panel `related data`.  
Without selecting a specific participations i would like to add a smart action into this view.

I already tries the following with no success:

- Add a smart action in Campaign collection: It only displays when I select a specific campaign
- Add a smart action in Participation collection: It only displays when I select a specific participation in views Participation and Campaign \> Campaign XX \> Participations but when a deselect everything no smart actions are displayed.

I also try to add a `Participations` action (plural) but it not working.

Regards,  
AlainK

---

<div class="post-metadata">

**Author:** ![arnaud](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/arnaud/32/32_2.png) [@arnaud](https://community.forestadmin.com/u/arnaud)\
**Post date:** [September 22, 2020, 1:29pm UTC](https://community.forestadmin.com/t/related-data-smart-action-on-all-the-collection/1015/2 "2020-09-22T13:29:45Z")

</div>

Hi @Alaink,

Welcome to the Forest Admin community!

As far as I know, you cannot add a “global” action in a specific “related data” section so far.  
I have no better ideas, the 2 implementations you tried are the best things you can do.

I prefer the Smart Action in the `campaign` collection, it makes more sense to me as what you want is a global action on the `participations` of this `campaign`.  
The usage for your team would be to check the `participations` and then go back to the `campaign` details to trigger the action.

A solution would be to configure a Summary View to have the action button and the `participations` in the same view (in a `campaign` Summary View), but this is a premium feature.  
More about the Summary Views here:

> **[Build a Summary view](https://docs.forestadmin.com/documentation/reference-guide/views/build-a-summary-view)**

I hope it helps.

---

<div class="post-metadata">

**Author:** ![Alaink](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/alaink/32/825_2.png) [@Alaink](https://community.forestadmin.com/u/Alaink)\
**Post date:** [September 22, 2020, 1:34pm UTC](https://community.forestadmin.com/t/related-data-smart-action-on-all-the-collection/1015/3 "2020-09-22T13:34:41Z")

</div>

Hi @arnaud,

Thank you for your quick reply, yes you right if it is not possible I will add the smart action in the `campaign` collection as it is more natural to trigger a global action on all related participations here.

I will also check your suggestion on Summary View.

Thank you.
