# Entity list view: Filter view

**URL:** <https://community.fibery.io/t/entity-list-view-filter-view/4022>\
**Category:** Get Help\
**Created:** [February 20, 2023, 10:33am UTC](https://community.fibery.io/t/entity-list-view-filter-view/4022 "2023-02-20T10:33:14Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![aoe](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/aoe/32/6018_2.png) [@aoe](https://community.fibery.io/u/aoe)\
**Post date:** [February 20, 2023, 10:33am UTC](https://community.fibery.io/t/entity-list-view-filter-view/4022/1 "2023-02-20T10:33:14Z")

</div>

I have some relations between Meeting, Project, Task.

A Project can have many Tasks and many Meetings.  
A Task can have one Project and many Meetings.  
A Meeting can have one Project and many Tasks.

 ![filter_list_view](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/2/25b7fe8bdfa668ff321b4f7386707d3d86219187.png)

Whenever we have a Meeting, we also want to have Tasks connected to it. So we can add it directly in the Tasks view (image). And to make it automatically connected to the Meeting’s Project we can set up a Global filter. But this effects all other Projects as well. So I thought, can I filter by `[This Meeting].Project` instead, so it’s automatically connected to the right Project?

**But I don’t see if this is possible?**

It may be similar to this thread.

> [@Filter by field in related entity?](https://community.fibery.io/t/filter-by-field-in-related-entity/1758):
>
> Is there a way to filter a view by fields in related entries? For example: Products with UserStories where SprintStatus is current? In the Workspace for Product Teams → app:SoftwareDevelopment → view: Current Sprint: I have set rows as Product. I wish fo filter out all Products that don’t have any Stories planed in the current sprint. It tends to clutter the view allot when you have a couple of Products that are empty.

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [February 20, 2023, 10:45am UTC](https://community.fibery.io/t/entity-list-view-filter-view/4022/2 "2023-02-20T10:45:31Z")

</div>

> [@aoe](#):
>
> Whenever we have a Meeting, we also want to have Tasks connected to it.

What do you mean by the ‘Tasks connected to it’?  
Based on how you have described your relations

> [@aoe](#):
>
> A Project can have many Tasks and many Meetings.  
> A Task can have one Project and many Meetings.  
> A Meeting can have one Project and many Tasks.

a Task could be linked directly to a Meeting (many-to-many), but can also be inferred as being related to a Meeting because it shares the same parent Project.

If you want to show the Tasks indirectly related to the Meeting, you could create a lookup, but this would be a read-only field.

The Tasks field you are showing in the image above represents the direct relation by default.  
If you want to change the relation view to be context filtered to show indirectly related Tasks (= those Tasks owned by the Project that the Meeting is owned by) then it is not possible for the reasons explained here:

> [@Missing lookup to filter a board](https://community.fibery.io/t/missing-lookup-to-filter-a-board/3877/10):
>
> Perhaps I can explain how Fibery works with respect to these (interconnected) issues, and then hopefully it’ll help clarify things a little. Lookups Lookups are read-only fields that will show a collection of entities. They actually are very similar to formulas under-the-hood. At the moment, they are only able to be shown as lists on entity view, so the features that are available for standard relation views (sorting, colour-coding etc.) are not available. This might be improved soon …

---

<div class="post-metadata">

**Author:** ![aoe](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/aoe/32/6018_2.png) [@aoe](https://community.fibery.io/u/aoe)\
**Post date:** [February 20, 2023, 11:40am UTC](https://community.fibery.io/t/entity-list-view-filter-view/4022/3 "2023-02-20T11:40:18Z")

</div>

> What do you mean by the ‘Tasks connected to it’?  
> Based on how you have described your relations

That Task has a many-to-many relation with Meeting.

Task also has a direct relation to a Project.

But if I understand it correctly I can’t have a global filter on the Task relation view that says:

`Project is [This.Meeting].Project`

and instead have to select an individual project?

---

<div class="post-metadata">

**Author:** ![aoe](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/aoe/32/6018_2.png) [@aoe](https://community.fibery.io/u/aoe)\
**Post date:** [February 20, 2023, 11:52am UTC](https://community.fibery.io/t/entity-list-view-filter-view/4022/4 "2023-02-20T11:52:42Z")

</div>

@Chr1sG I think I may be asking for formulas in filters, similar to this one perhaps:

> [@Formulas in Views Filters](https://community.fibery.io/t/formulas-in-views-filters/2133):
>
> Currently, if we need to filter by parent field we need to create a formula in child type and then filter by this field. It would be great to filter by parent fields without additional formulas. PS: Correct me if it’s already available to use.

And if not possible now, if there’s a workaround.

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [February 20, 2023, 12:36pm UTC](https://community.fibery.io/t/entity-list-view-filter-view/4022/5 "2023-02-20T12:36:22Z")

</div>

Well, I would take a step back and ask the question: what is the meaning of having two relations between Task and Project (one direct and one indirect)?

Can a Task belong to a Meeting but not belong to the Project that the Meeting relates to?  
Can a Task belong to a Project but not belong to all the Project’s Meetings?

What is the flow for users in terms of when/how Tasks are created?

---

<div class="post-metadata">

**Author:** ![aoe](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/aoe/32/6018_2.png) [@aoe](https://community.fibery.io/u/aoe)\
**Post date:** [February 20, 2023, 12:48pm UTC](https://community.fibery.io/t/entity-list-view-filter-view/4022/6 "2023-02-20T12:48:44Z")

</div>

**TLDR**  
A simple way to create Tasks within a Meeting, that is automatically associated to a Project.

**Description**

> Can a Task belong to a Meeting but not belong to the Project that the Meeting relates to?

Yes (in practice right now). But we would like a Task to always be connected to a Project. So this is done manually right now (if it’s created in a view that does not set the Project at creation).

`Can a Task belong to a Project but not belong to all the Project’s Meetings?`

Yes.

> What is the flow for users in terms of when/how Tasks are created?

Basically one of these:

1. Within a Project, create a Task. E.g within the Project “Clean the office” have the Tasks “Clean windows”, “Clean floor”, e.t.c.
2. Within a Meeting (that is connected to a Project), create action items (Tasks). E.g. within the Meeting “Review of office cleaning” have the Tasks “Clean windows again, missed a spot”

I have already made a button within a Meeting that automatically sets the Project based on the Meeting’s related Project. And it works fine.

But if you look at the first image in this thread I’m looking for a way to create a Task from the Task relation view and have it set the Project automatically.

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [February 20, 2023, 1:19pm UTC](https://community.fibery.io/t/entity-list-view-filter-view/4022/7 "2023-02-20T13:19:44Z")

</div>

> [@aoe](#):
>
> I have already made a button within a Meeting that automatically sets the Project based on the Meeting’s related Project. And it works fine.

Do you mean that you have an automation that sets the Project for a Task whenever that Task is created in a Meeting?

If so, I don’t know why you think you need this

> [@aoe](#):
>
> a way to create a Task from the Task relation view and have it set the Project automatically.

---

<div class="post-metadata">

**Author:** ![aoe](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/aoe/32/6018_2.png) [@aoe](https://community.fibery.io/u/aoe)\
**Post date:** [February 20, 2023, 1:27pm UTC](https://community.fibery.io/t/entity-list-view-filter-view/4022/8 "2023-02-20T13:27:27Z")

</div>

> Do you mean that you have an automation that sets the Project for a Task whenever that Task is created in a Meeting?

No I have a button, like this image

 ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/4/4333c88d6447f37577d2b33f0709e18bfb26543e.png)

But do you think it would be possible to do what you suggest?

Basically, I’m asking this for my team members. I know of the limitations that currently exist and can go to the button whenever I want to create a Task from a Meeting. But since the software allows for creation of tasks from many different places and it says “Link or Create” you expect the Task to be connected to the Meeting’s Project as well.

![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/2/2beda6b29713c5660e72bb1baeedf9af25e87e82.png)

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [February 20, 2023, 1:40pm UTC](https://community.fibery.io/t/entity-list-view-filter-view/4022/9 "2023-02-20T13:40:48Z")

</div>

OK, I suspect you need an automation like this:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/4/4304d27e031da36f8c29d244d75bd5ca07a36930.png)

This will be triggered if a Task is created in a Meeting’s relation field (since the Task is effectively being linked to the Meeting immediately on creation).  
It will link the Task to the Project that the Meeting belongs to.

But note, if you were to move a Task from one Meeting to another, and the second Meeting belonged to a different Project, the Task would be switched from the first Meeting’s Project to the second’s.  
I guess this may not happen very often, but you need to think if this is the behaviour you want.

There is basically no easy fix for this issue, since the current database relations allow for a Task to be linked to multiple Meetings, and yet these Meetings might not belong to the same Project.

---

<div class="post-metadata">

**Author:** ![aoe](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/aoe/32/6018_2.png) [@aoe](https://community.fibery.io/u/aoe)\
**Post date:** [February 20, 2023, 1:47pm UTC](https://community.fibery.io/t/entity-list-view-filter-view/4022/10 "2023-02-20T13:47:01Z")

</div>

Thanks, it works fine!

 ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/c/cb2b7a0eef73f1127d9b60770d33f8237c3df3a5.png)

I added “Project is empty” as a condition for running the automation. When I changed Meeting it did not trigger the automation.

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [February 20, 2023, 1:51pm UTC](https://community.fibery.io/t/entity-list-view-filter-view/4022/11 "2023-02-20T13:51:42Z")

</div>

> [@aoe](#):
>
> When I changed Meeting it did not trigger the automation.

Yeah, that is one way of ensuring that a Task doesn’t accidentally change Project if it is added to another Meeting.  
But still begs the question of how to resolve if a Task is linked to multiple Meetings each with a different parent Project… 🤷  
Hopefully, it is a largely theoretical question 🤞

---

<div class="post-metadata">

**Author:** ![aoe](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/aoe/32/6018_2.png) [@aoe](https://community.fibery.io/u/aoe)\
**Post date:** [February 20, 2023, 2:20pm UTC](https://community.fibery.io/t/entity-list-view-filter-view/4022/12 "2023-02-20T14:20:29Z")

</div>

Yes, I actually changed the relation so that a Task can only be connected to one Meeting. There was no need for a many-to-many relation to begin with.

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [February 20, 2023, 2:26pm UTC](https://community.fibery.io/t/entity-list-view-filter-view/4022/13 "2023-02-20T14:26:55Z")

</div>

Then I guess the automation will need to change:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/d/d55bedbe7e950cc371334d3887228e8fa6ec4d5f.png)

---

<div class="post-metadata">

**Author:** ![aoe](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/aoe/32/6018_2.png) [@aoe](https://community.fibery.io/u/aoe)\
**Post date:** [February 20, 2023, 2:30pm UTC](https://community.fibery.io/t/entity-list-view-filter-view/4022/14 "2023-02-20T14:30:07Z")

</div>

Yes, already changed 🙂

But good for anyone else to see as well.

---

<div class="post-metadata">

**Author:** ![Matt\_Blais](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/matt_blais/32/1464_2.png) [@Matt\_Blais](https://community.fibery.io/u/Matt_Blais)\
**Post date:** [February 20, 2023, 4:39pm UTC](https://community.fibery.io/t/entity-list-view-filter-view/4022/15 "2023-02-20T16:39:33Z")

</div>

FYI it’s also possible when creating an **inline entity in a Rich Text field** (via `Ctrl/Cmd+E`) to automatically link the new entity to the one you are working within (i.e. the entity containing the Rich Text) or some other related entity.

This does require some more complex scripting though:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/5/5d130d9580c3d7fc3ab2e7680ef51f5af9871e2e.png)

```auto

// If a Task's "Project" field is uninitialized, and there is a "Meeting Notes"
// that references the Task, set the Task's "Project" field from the MN's "Default Project".

// Script parameters
const ENTITY_LINK_FIELD = 'Project' // Task field that needs to be set
const PARENT_TYPE = 'Project/Project' // Type we want to find a link to (value for)
const REF_ENTITY_TYPES = ['Clients/Meeting Notes'] // Types that have a "Default Project" field
const REF_ENTITY_LINK_FIELD = 'Default Project' // Name of the field to copy

const fibery = context.getService('fibery')
// const log = console.log

for (const entity of args.currentEntities) {
    // Set the Project field only if empty
    if (entity[ENTITY_LINK_FIELD].id !== null) { continue }
    // Get all references to the Task
    const entityWithRefs = await fibery.getEntityById(entity.type, entity.id, ['References'])
    // Look for a reference to a type with a "Default Project" field (i.e. Meeting Notes)
    for (const ref of entityWithRefs['References']) {
        // Get referencing doc
        const refDoc = await fibery.getEntityById('Collaboration~Documents/Reference', ref['Id'], ['FromEntityId', 'FromEntityType'])
        const refType = refDoc['FromEntityType'].name
        if (refType == PARENT_TYPE) {
            // The referring entity is the actual PARENT_TYPE (so its ID can be used directly)
            // I.e. a Task was created/referenced in a Project's Rich Text field, so we know the Project
            const refEntity = await fibery.getEntityById(refType, refDoc['FromEntityId'], ['Name'])
            // log(` refType == PARENT_TYPE: ${refType}, ${refDoc['FromEntityId']} ${refEntity.id}`)
            await fibery.updateEntity(entity.type, entity.id, { [ENTITY_LINK_FIELD]: refEntity.id })
            break
        } else if (REF_ENTITY_TYPES.includes(refType)) {
            // Found a suitable referring entity (i.e. that has a "Default Project" field)
            const refEntity = await fibery.getEntityById(refType, refDoc['FromEntityId'], ['Name', REF_ENTITY_LINK_FIELD])
            if (refEntity != null && refEntity[REF_ENTITY_LINK_FIELD].id != null) {
                const refId = refEntity[REF_ENTITY_LINK_FIELD].id
                await fibery.updateEntity(entity.type, entity.id, { [ENTITY_LINK_FIELD]: refId })
                break
            }
        }
    }
}

```

---

<div class="post-metadata">

**Author:** ![aoe](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/aoe/32/6018_2.png) [@aoe](https://community.fibery.io/u/aoe)\
**Post date:** [February 20, 2023, 4:50pm UTC](https://community.fibery.io/t/entity-list-view-filter-view/4022/16 "2023-02-20T16:50:14Z")

</div>

That’s nice, thanks for sharing!

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [February 20, 2023, 7:28pm UTC](https://community.fibery.io/t/entity-list-view-filter-view/4022/17 "2023-02-20T19:28:19Z")

</div>

Actually, I think they should be automatically linked when created if there exists a relationship that is one-to-many.

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [April 29, 2025, 11:10am UTC](https://community.fibery.io/t/entity-list-view-filter-view/4022/18 "2025-04-29T11:10:36Z")

</div>


