[DONE] Error when using created on in conditional

Hello, I have a problem every time I call a field created on an automation it returns this error.

image

my if is this

2 Likes

It is hard to help without seeing your automation.
But my guess is you are calling a date field that is not populated on create. Automation returns empty and this could cause en error.
Like I said, guessing, hard to tell without seeing automation.

2 Likes

Thank you very much for your help but
the action with the error is this if no print
and the field is a created on type that is automatically updated upon creation

1 Like

If I understand it correctly…
you are running automation on create, right?
And you are using created on field?
If that is correct I don’t understand the logic and what are you trying to achieve, because you are using conditional on create +2 days which doesn’t make sense to me.
Maybe explain more what are you trying to do accomplish. :slightly_smiling_face:

1 Like

I understand your question, it is a scheduled flow that will run every day to check if we have items with overdue completion.

1 Like

Since we don’t have the the whole automation to better understand the issue, maybe a little quick workaround: add new date filed. Update it when record is created +2 days. Create filter view with that date field and save it as a view.
Use that view on runs to check all overdue records…
hope this helps.

1 Like

@joao.matheus has sent me some more details and this is replicate able:

3 Likes

@joao.matheus

Sorry, I ran out of time yesterday however if you want to get it working while the Tape team are looking at it then I believe the following will work for you:
First of all change your conditional filter into a script:


then make some changes:

  1. You can remove the undefined time on the current dateline
  2. you can remove the time on the created at-time
  3. Replace the value with your collected variable. This certainly stops the error, and I think it will give the result you want, but you should check as that is hard for me to do.
  4. You should end up with something like:
TapeUtils.isDateEqual(
    { date: collected_action_created_at_date },
    { date: current_date_local},
    current_workflow_timezone,
    { offset_operator: 'MINUS', offset_amount: (2) ?? 0 }
    )

also as we discussed your ‘offset’ needs to be MINUS not PLUS

Hope that helps

2 Likes

Hi @joao.matheus,

thank you very much for reporting the issue and many many thanks to @tomaz and @jason for the great support in debugging the issue.

According to Jason’s analysis, we assume that there is an issue in the code generation of the filter, we are already checking and trying to roll out a fix today.

We will get back to you here as soon as we have new findings or the issue is fixed.

Best regards
Leo

1 Like

Thanks for your report @joao.matheus. Additional thanks for diving into this @Jason and providing the workaround.

Indeed, this is a confirmed bug on our side. Fix incoming - will let you know once it’s live.

Cheers
Tim

EDIT: The fix is already live. Could you confirm that this is working as expected now? :sunglasses:

3 Likes