Help

Save the date! Join us on October 16 for our Product Ops launch event. Register here.

Automation: - I want formula field to stop the countdown when the date field is not blank

Topic Labels: Automations
Solved
Jump to Solution
1077 4
cancel
Showing results for 
Search instead for 
Did you mean: 
SpelaU
7 - App Architect
7 - App Architect

Hi!

I have a date field and a formula field (today MINUS date field) and another formula field that countdown (3 MINUS subtraction between today and date field) - I included photo of these fields. 

This is because the customs allows only 3 days for import the product. So I want an alert (countdown from when the customs contacted me that the product is at the customs).

Now I want to add another date field (let's call it date field #2).

I want automation (or formula field) that when I enter date in date field #2, formula field stops the countdown. 

Is it possible to do that with automation or another formula field? And also, how it's done? 🙂

Thanks a lot guys!

1 Solution

Accepted Solutions

Check out this screenshot.  Today's 25 July, and that's why "Days product at customs" shows as 2 for the first record

Screenshot 2023-07-25 at 10.20.13 PM.png

And I'm using an "IF()" to decide what kind of data to show, specifically whether to stop the countdown / continue the countdown:

 

 

IF(
  {Date Field #2},
  DATETIME_DIFF(
    {Date Field #2}, 
    {Date Field #1}, 
  'days'),
  DATETIME_DIFF(
    TODAY(), 
    {Date Field #1}, 
    'days'
  )
)

 

 


Link to base

(I also just realized I'm assuming that filling Date Field #2 means that you've imported the product already and that's why you want to stop the countdown?  Apologies if this assumption is in error!)

See Solution in Thread

4 Replies 4

I think the photo didn't manage to upload

You should be able to do this with an `IF()` checking whether Date Field #2 is empty.  Check out the formula field reference to see how to use it

carina.PNG

The first field is date field (#1), second field is formula field (today MINUS date field) and the third field is formula field (3 MINUS subtraction between today and date field).

On photo there is no date field #2 (I will add it)..

Can you be more specific? I'm new here and I don't know where to start with the link you just send me. Thanks!

Check out this screenshot.  Today's 25 July, and that's why "Days product at customs" shows as 2 for the first record

Screenshot 2023-07-25 at 10.20.13 PM.png

And I'm using an "IF()" to decide what kind of data to show, specifically whether to stop the countdown / continue the countdown:

 

 

IF(
  {Date Field #2},
  DATETIME_DIFF(
    {Date Field #2}, 
    {Date Field #1}, 
  'days'),
  DATETIME_DIFF(
    TODAY(), 
    {Date Field #1}, 
    'days'
  )
)

 

 


Link to base

(I also just realized I'm assuming that filling Date Field #2 means that you've imported the product already and that's why you want to stop the countdown?  Apologies if this assumption is in error!)

Yes, that is a correct assumption.  Sorry that I didn't mention this before.

Thank you so much.. I did it and it finally works! Based on the formula you sent I was able to write the formula for the "days left to import" and stop the countdown if the date field #2 is full. 

 Have a nice day!