# Button/Rule formula cannot set only half of an uninitialized Date Range

**URL:** <https://community.fibery.io/t/button-rule-formula-cannot-set-only-half-of-an-uninitialized-date-range/2791>\
**Category:** Bugs & Issues\
**Tags:** automations, formulas\
**Created:** [May 12, 2022, 5:07pm UTC](https://community.fibery.io/t/button-rule-formula-cannot-set-only-half-of-an-uninitialized-date-range/2791 "2022-05-12T17:07:53Z")\
**Posts on this page:** 7\
**Page:** 1

<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:** [May 12, 2022, 5:07pm UTC](https://community.fibery.io/t/button-rule-formula-cannot-set-only-half-of-an-uninitialized-date-range/2791/1 "2022-05-12T17:07:53Z")

</div>

In a Button/Rule that uses a formula to set a Date Range field, if either part of the Date range is null, the action is silently ignored.

Context: I have a Date Range field “Actual” for noting the dates when a task is “Actually” started and completed (as opposed to “Scheduled” start and end). So the Start and End parts of the Date Range need to be set separately at different times.

Here is a Button formula that tries to set _only the Start_ of a the Date Range field named ‘Actual’ (leaving the End as-is):

```auto
DateRange(
  Today(), [Step 1 Task].Actual.End()
)

```

But if the `[Step 1 Task].Actual.End()` is uninitialized, the action silently fails to update the field.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/d/d30439bcdb6a18f6187c8bbd9e154f116fc7e78d.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:** [May 12, 2022, 5:13pm UTC](https://community.fibery.io/t/button-rule-formula-cannot-set-only-half-of-an-uninitialized-date-range/2791/2 "2022-05-12T17:13:04Z")

</div>

Yeah. Date ranges require both values, and if one is blank, the range is undefined (and thus the field is empty).  
I guess you could update the formula with an if (isempty())…then… option so that the date range defaults to something meaningful (although I’m not sure what you would want the default to be.

---

<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:** [May 12, 2022, 5:13pm UTC](https://community.fibery.io/t/button-rule-formula-cannot-set-only-half-of-an-uninitialized-date-range/2791/3 "2022-05-12T17:13:58Z")

</div>

In the UI you can update only half of the range with no problem - it’s an automation issue.

For that matter it would be useful to have a `Null` constant in Formulas, so we can actually set something to null/empty. Anything that can be done in the UI should also be able to be done by 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:** [May 12, 2022, 5:22pm UTC](https://community.fibery.io/t/button-rule-formula-cannot-set-only-half-of-an-uninitialized-date-range/2791/4 "2022-05-12T17:22:18Z")

</div>

> [@Matt\_Blais](#):
>
> In the UI you can update only half of the range with no problem

That’s not what I experience. Are you able to define open ended ranges?

![chrome_JZwgxrhNH8](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/1/1da539fbf22dd013e8d552bebc500a86b1dc2b5d.gif)

---

<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:** [May 12, 2022, 5:24pm UTC](https://community.fibery.io/t/button-rule-formula-cannot-set-only-half-of-an-uninitialized-date-range/2791/5 "2022-05-12T17:24:20Z")

</div>

> [@Matt\_Blais](#):
>
> so we can actually set something to null/empty

For most fields, this can be done with ‘Clear the Field value’

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

---

<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:** [May 12, 2022, 5:24pm UTC](https://community.fibery.io/t/button-rule-formula-cannot-set-only-half-of-an-uninitialized-date-range/2791/6 "2022-05-12T17:24:52Z")

</div>

My mistake - you are right about that.

---

<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:** [May 12, 2022, 5:27pm UTC](https://community.fibery.io/t/button-rule-formula-cannot-set-only-half-of-an-uninitialized-date-range/2791/7 "2022-05-12T17:27:39Z")

</div>

To be fair, I would like it to be possible. The alternative is two separate date fields, which is less intuitive/user-friendly.  
In my case, it relates to this issue as well:

> [@Show entities with no end date on timeline](https://community.fibery.io/t/show-entities-with-no-end-date-on-timeline/934):
>
> Sometimes, I have entities which have start and end date fields, but for which the end date is not yet chosen (like projects that have started, but who knows when they will finish). They don’t currently show in the timeline view as it is now. Would it be possible to add an option to enable/disable display of such items (so that an empty end date field corresponds to a date infinitely far in the future)? Of course, I could also imagine it would be useful to do something similar for items with n…
