# Return "no-entity" from a formula

**URL:** <https://community.fibery.io/t/return-no-entity-from-a-formula/4174>\
**Category:** Get Help\
**Created:** [March 23, 2023, 4:15am UTC](https://community.fibery.io/t/return-no-entity-from-a-formula/4174 "2023-03-23T04:15:33Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![billyjackson](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/billyjackson/32/6345_2.png) [@billyjackson](https://community.fibery.io/u/billyjackson)\
**Post date:** [March 23, 2023, 4:15am UTC](https://community.fibery.io/t/return-no-entity-from-a-formula/4174/1 "2023-03-23T04:15:33Z")

</div>

I’d like to create a formula that links a field from an Outcome to a Proposal through a Project.  
[Outcome] One ↔ One [Project] One ↔ Many [Proposals]  
This is relatively simple: I can create a formula inside of Proposals

`Project.Outcome.[Over vs Under Resourced]`

However, I’d only like this information to bubble through to the proposal if the proposal was the one that was approved.

In this case, I’d like to use something like

```auto
If(Proposal.Status.Name="Approved", Project.Outcome.[Over vs Under Resourced], *Blank*)

```

However, I’m not sure what I can do to return nothing. [Over vs Under Resourced] is a single-select entity (and I’d like to return the whole entity, rather than the name for UI purposes), but something like “” doesn’t work, because it is string-typed.

Is there a way to return a blank that shares a type with [Over vs Under Resourced]?

Thank you!

---

<div class="post-metadata">

**Author:** ![tpaktop](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/tpaktop/32/6394_2.png) [@tpaktop](https://community.fibery.io/u/tpaktop)\
**Post date:** [March 23, 2023, 2:07pm UTC](https://community.fibery.io/t/return-no-entity-from-a-formula/4174/2 "2023-03-23T14:07:03Z")

</div>

It’s an interesting use case.  
I don’t think it’s possible with formulate.  
However, you can kinda hack it.

1. Use text field instead of formula.
2. Create rule for update of status.
3. Filter to only approved
4. On Update of Status to Approved set the text field “[Over vs Under Resourced]” using formula

```auto
Project.Outcome.[Over vs Under Resourced]

```

If you want to clear it you would need another rule:  
2. Create rule for update of status.  
3. Filter to NOT approved  
4. Update “[Over vs Under Resourced]” using “Clear field value”

---

<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:** [March 23, 2023, 4:54pm UTC](https://community.fibery.io/t/return-no-entity-from-a-formula/4174/3 "2023-03-23T16:54:51Z")

</div>

This has been requested before!  
There is an ugly way to hack it, which is to filter for an entity that will never be found:

`Project.Outcome.Filter(Name = "!LOL!").Sort().First()`

---

<div class="post-metadata">

**Author:** ![billyjackson](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/billyjackson/32/6345_2.png) [@billyjackson](https://community.fibery.io/u/billyjackson)\
**Post date:** [March 23, 2023, 5:08pm UTC](https://community.fibery.io/t/return-no-entity-from-a-formula/4174/4 "2023-03-23T17:08:59Z")

</div>

> [@Matt\_Blais](#):
>
> Project.Outcome.Filter(Name = “!LOL!”).Sort().First()

That is brilliant but alas it doesn’t seem to like it:

 ![Screen Shot 2023-03-23 at 10.08.05 AM](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/f/f5bc1428fd543eb84eecd59495cf594db87af5d3.png)

Perhaps you cannot filter on a one-to-one relation?

---

<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:** [March 23, 2023, 5:14pm UTC](https://community.fibery.io/t/return-no-entity-from-a-formula/4174/5 "2023-03-23T17:14:16Z")

</div>

If you want to return a specific field like `[Client Temperature]` from the Formula, you must add that field to the bogus search result as well, because all potential (conditional) Formula results must return the same data type:

```auto
Project.Outcome.Filter(Name = “!LOL!”).Sort().First().[Client Temperature]

```

---

<div class="post-metadata">

**Author:** ![billyjackson](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/billyjackson/32/6345_2.png) [@billyjackson](https://community.fibery.io/u/billyjackson)\
**Post date:** [March 23, 2023, 5:46pm UTC](https://community.fibery.io/t/return-no-entity-from-a-formula/4174/6 "2023-03-23T17:46:03Z")

</div>

> [@Matt\_Blais](#):
>
> `Project.Outcome.Filter(Name = “!LOL!”).Sort().First().[Client Temperature]`

It seems it’s the filter method itself it has a problem with

 ![Screen Shot 2023-03-23 at 10.45.38 AM](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/3/3a9d42d9f65bad3a32d076e1c409d0ff89472db3.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:** [March 23, 2023, 5:50pm UTC](https://community.fibery.io/t/return-no-entity-from-a-formula/4174/7 "2023-03-23T17:50:06Z")

</div>

Yep, you can’t filter on a to-one relation.  
AFAIK there’s no easy way to do this using field formulas only 😞

---

<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:** [March 23, 2023, 6:02pm UTC](https://community.fibery.io/t/return-no-entity-from-a-formula/4174/8 "2023-03-23T18:02:33Z")

</div>

Some day 🙄

**Related:**

> [@Allow to return an empty value from a formula](https://community.fibery.io/t/allow-to-return-an-empty-value-from-a-formula/2983/2):
>
> Related:
