# Ability to set single-select formula value?

**URL:** <https://community.fibery.io/t/ability-to-set-single-select-formula-value/627>\
**Category:** Get Help\
**Created:** [March 29, 2020, 11:15pm UTC](https://community.fibery.io/t/ability-to-set-single-select-formula-value/627 "2020-03-29T23:15:41Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![thure](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/thure/32/532_2.png) [@thure](https://community.fibery.io/u/thure)\
**Post date:** [March 29, 2020, 11:15pm UTC](https://community.fibery.io/t/ability-to-set-single-select-formula-value/627/1 "2020-03-29T23:15:41Z")

</div>

When you install the software development app, it starts with “Severity” and “Priority” single-select fields on the Bug type. The options have names like “High”, “Medium”, “Low”, but they also have a number value that’s accessed in a “Pain” formula.

I’d like to do something similar for the Effort field, but I can’t find the option to set/edit the number value in the UI, and the API is vague on how to create an enum with number values. My schema has “Development/Value” as a type, but when I try to create an enum that uses it I get “Field Development/Value was not found in type Development/Effort\_Development/Story.”

Is there a way to set these number values using the API?

---

<div class="post-metadata">

**Author:** ![mdubakov](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/mdubakov/32/10_2.png) [@mdubakov](https://community.fibery.io/u/mdubakov)\
**Post date:** [April 11, 2020, 10:52am UTC](https://community.fibery.io/t/ability-to-set-single-select-formula-value/627/2 "2020-04-11T10:52:28Z")

</div>

This is tricky. You can add Value field to Single Select as shown below. In fact Single Select is just a Type under the hood and you can add as many fields as you wish and access them via Formulas or API

---

<div class="post-metadata">

**Author:** ![Pagandai\_V\_Pannirsel](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/pagandai_v_pannirsel/32/177_2.png) [@Pagandai\_V\_Pannirsel](https://community.fibery.io/u/Pagandai_V_Pannirsel)\
**Post date:** [April 11, 2020, 12:53pm UTC](https://community.fibery.io/t/ability-to-set-single-select-formula-value/627/3 "2020-04-11T12:53:20Z")

</div>

good answer

---

<div class="post-metadata">

**Author:** ![thure](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/thure/32/532_2.png) [@thure](https://community.fibery.io/u/thure)\
**Post date:** [April 15, 2020, 4:39pm UTC](https://community.fibery.io/t/ability-to-set-single-select-formula-value/627/4 "2020-04-15T16:39:04Z")

</div>

Aha, that did the trick! Lovely, thank you 😌

---

<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:** [September 1, 2020, 12:30pm UTC](https://community.fibery.io/t/ability-to-set-single-select-formula-value/627/5 "2020-09-01T12:30:17Z")

</div>

This is a great feature. Wish I’d known about it sooner.  
Given that a single-select is just a type under-the-hood, is it possible to link a single-select field to more than one parent type? Or even the same type more than once?  
Sometimes it’s useful to have the enumerations defined once but used several places…

Also, @mdubakov is multi-select also just a type under-the-hood? Seems like it.

---

<div class="post-metadata">

**Author:** ![mdubakov](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/mdubakov/32/10_2.png) [@mdubakov](https://community.fibery.io/u/mdubakov)\
**Post date:** [September 1, 2020, 8:23pm UTC](https://community.fibery.io/t/ability-to-set-single-select-formula-value/627/6 "2020-09-01T20:23:37Z")

</div>

It is not possible to link a single select field to more than one parent type. Otherwise things can go crazy 🙂

Multi-select is also just a type.

---

<div class="post-metadata">

**Author:** ![njyo](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/njyo/32/923_2.png) [@njyo](https://community.fibery.io/u/njyo)\
**Post date:** [June 8, 2023, 10:30am UTC](https://community.fibery.io/t/ability-to-set-single-select-formula-value/627/7 "2023-06-08T10:30:04Z")

</div>

Hi all,

Just wondering, if I wanna assign a single-select value in a formula, for example to update the state of a Feature based on all the User Stories in it (i.e. once all US are `Done`, mark the Feature as `Done`).

I do not see how [this answer](https://community.fibery.io/t/ability-to-set-single-select-formula-value/627/2) solves that? I remember @ChrisG highlighting that I can give single-select options additional fields, which is great, but I don’t think I can select them in a formula.

It does seem to me that I can use this workaround:

 ![2023-06-08 at 18.28](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/e/e8d202a4f5ee3d81cf89f7452d41f7fec409167c.png)

But I’d think this is ugly enough for being a proper solution, no?  
Thanks

---

<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:** [June 8, 2023, 12:39pm UTC](https://community.fibery.io/t/ability-to-set-single-select-formula-value/627/8 "2023-06-08T12:39:09Z")

</div>

Assuming you have Feature → User Stories, then I can think of a couple of ways to do it:

1. You can have an automation in the User Story db that runs when the state becomes Done, and updates the parent Feature’s State (based on a formula that checks that there are no linked User Stories that are _not_ done, and if so, sets the State to Done). This would use a construction like you have shown.
2. You can have a formula in the Feature db, e.g. `[User Stories].filter(State.Name = 'Done').Count() = [User Stories].Count()` and then an automation to update the Feature State to Done when this is True.

---

<div class="post-metadata">

**Author:** ![njyo](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/njyo/32/923_2.png) [@njyo](https://community.fibery.io/u/njyo)\
**Post date:** [June 9, 2023, 3:27am UTC](https://community.fibery.io/t/ability-to-set-single-select-formula-value/627/9 "2023-06-09T03:27:57Z")

</div>

Thanks, @Chr1sG! I see where I went wrong 🤦‍♂️

That said, it still doesn’t feel neat, because what I want is:

- Have an automation that updates the Feature whenever a User Story state changes: It’ll check if the parent Feature has any remaining open User Stories and if not, sets the Feature to `Done`.
- **The problem is:** If I use a formula to check for open user Stories, I need to assign the `Done` state from the formula. That is only possible with the convoluted construct from my screenshot, where I filter for a Feature with my intended state and assign that… (as you say in your answer #1)

Your solution 2 would allow me to do a static assignment of `Done` in the Feature, which is neat. But it then convolutes my database with a formula that’s not really providing any _data_ value, but is needed for working around a tooling limitation. This is clearly not desirable long-term. 🙂

In the end, the most elegant approach would be to be able to refer to specific states (single/multi-select options) in a formula. For example via `Features.States.Done` or a similar syntax. This also has the advantage that it’ll break and throw errors, when the states get modified.

Thanks! 🙂

---

<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:** [June 9, 2023, 7:14am UTC](https://community.fibery.io/t/ability-to-set-single-select-formula-value/627/10 "2023-06-09T07:14:57Z")

</div>

You’re right, that both my suggestions are sub-optimal. I know that @antoniokov is aware of this use case, and it is likely that we will support the ability to set a state just by assigning a string. in this case you could use suggestion #1 without needing the convoluted workaround.

---

<div class="post-metadata">

**Author:** ![njyo](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/njyo/32/923_2.png) [@njyo](https://community.fibery.io/u/njyo)\
**Post date:** [June 9, 2023, 8:19am UTC](https://community.fibery.io/t/ability-to-set-single-select-formula-value/627/11 "2023-06-09T08:19:33Z")

</div>

Thanks @Chr1sG!

Though I would think that assigning by type (i.e. `Features.States.Done`) is better than assigning by string `"Done"` because:

1. It’s more robust in case the single-selects or multi-selects get renamed
2. It’s in line of how one can assign an entity in a relationship

🙏

---

<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:** [June 9, 2023, 8:26am UTC](https://community.fibery.io/t/ability-to-set-single-select-formula-value/627/12 "2023-06-09T08:26:09Z")

</div>

Well, I kinda glossed over how we are thinking of implementing it by saying ‘string’. It is possible/likely that users would actually be able to type something like:  
`[[Done]]`  
which would map to a State ID in the backend, so that if the State options were renamed, the formula would still work (and any change would be reflected in the formula).

---

<div class="post-metadata">

**Author:** ![njyo](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/njyo/32/923_2.png) [@njyo](https://community.fibery.io/u/njyo)\
**Post date:** [June 12, 2023, 2:55am UTC](https://community.fibery.io/t/ability-to-set-single-select-formula-value/627/13 "2023-06-12T02:55:30Z")

</div>

Glad to hear, thanks! 🙂

---

<div class="post-metadata">

**Author:** ![njyo](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/njyo/32/923_2.png) [@njyo](https://community.fibery.io/u/njyo)\
**Post date:** [September 19, 2023, 10:38am UTC](https://community.fibery.io/t/ability-to-set-single-select-formula-value/627/14 "2023-09-19T10:38:41Z")

</div>

Just re-visiting this as I came across another case where I have a relations hip to a parent with multiple single-selects for classification, that I wanted to summarise in a child in order to make a Board View less cluttered.

---

<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:** [September 19, 2023, 11:16am UTC](https://community.fibery.io/t/ability-to-set-single-select-formula-value/627/15 "2023-09-19T11:16:31Z")

</div>

So you want the child entities to have a formula-generated field which takes the combination of multiple single-select in the parent?  
And this field itself should behave like a single-select (be used for rows/columns etc.).  
Did I understand correctly?

---

<div class="post-metadata">

**Author:** ![njyo](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/njyo/32/923_2.png) [@njyo](https://community.fibery.io/u/njyo)\
**Post date:** [September 26, 2023, 8:21am UTC](https://community.fibery.io/t/ability-to-set-single-select-formula-value/627/16 "2023-09-26T08:21:21Z")

</div>

Hi @Chr1sG,

Yes, I want to be able to have Single-Select (or Multi-Select, [Icon](https://community.fibery.io/t/set-icon-via-formula/5190/4), etc.) as possible formula outcome and with the according value. The reason is that Boards only allow certain field types to be used for the row/column labels. Also, I clearly prefer structured data to free text, so if I can generate controlled dictionaries rather than free text, then that’s a plus. 🙂

_Just a thought: Maybe in the formula editor I should be able to select the output type, rather than it be generated._

---

<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:** [September 26, 2023, 9:19am UTC](https://community.fibery.io/t/ability-to-set-single-select-formula-value/627/17 "2023-09-26T09:19:59Z")

</div>

I don’t think there is any way to get an enum (single-select or multi-select) as the output of a formula, if you need the formula to take into account that the parent has multiple single-select fields.  
Those multiple single-selects in the parent correspond to multiple (hidden) databases, and if it were possible to combine them into a single field, it would be something akin to supporting a polymorphic relation, which is not currently possible.

---

<div class="post-metadata">

**Author:** ![njyo](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/njyo/32/923_2.png) [@njyo](https://community.fibery.io/u/njyo)\
**Post date:** [September 26, 2023, 11:10am UTC](https://community.fibery.io/t/ability-to-set-single-select-formula-value/627/18 "2023-09-26T11:10:58Z")

</div>

So I can set up a parent with two single select (A, B and 1, 2) an exploded single select (A1, A2, B1, B2) in the child entity and I could make 2 formulae on the parent that trigger whenever one of the parent single select changes to set the child single select based on their values… but I cannot assign single-select values…

Anyway, not possible for now. 👌

---

<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:** [September 26, 2023, 11:19am UTC](https://community.fibery.io/t/ability-to-set-single-select-formula-value/627/19 "2023-09-26T11:19:00Z")

</div>

> [@njyo](#):
>
> So I can set up a parent with two single select (A, B and 1, 2) an exploded single select (A1, A2, B1, B2) in the child entity and I could make 2 formulae on the parent that trigger whenever one of the parent single select changes to set the child single select based on their values

I had understood your request as wanting the child to have a (multi-)select field that included choices A, B, 1 and 2, which it would inherit from the parent’s options.  
But now I understand it to mean that the you want the child to have a (single-)select field that includes the 4 possible combinations.  
I guess this is only possible using an automation, whereby the child single-select (with the 4 options pre-defined) is updated based on changes to the parent’s single-selects.

---

<div class="post-metadata">

**Author:** ![njyo](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/njyo/32/923_2.png) [@njyo](https://community.fibery.io/u/njyo)\
**Post date:** [September 26, 2023, 6:54pm UTC](https://community.fibery.io/t/ability-to-set-single-select-formula-value/627/20 "2023-09-26T18:54:33Z")

</div>

I thought so, but in my formula I cannot assign the single-select of the child… ☹

I guess I could have 4 automations…

[Next page](https://community.fibery.io/t/ability-to-set-single-select-formula-value/627.md?page=2)
