Related data : smart action on all the collection

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

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:

I hope it helps.

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.