cancel
Showing results for 
Search instead for 
Did you mean: 

BP Training - Section 9 - Deferring Items

Fran.Woodcock
Level 4

Hi, I am having trouble with an error message that comes up after I add in the deferring code at this section of the training.  

35740.png

I don't know what this means in as far as the the type being text.  I have gone back through the lessons to make sure I had everything right and I am pretty sure I do, but it still happens.  The process runs fine when I delete the deferral code.  

When I validate the code in the expression, it comes out fine, and shows the deferred time as what I would expect. 

I have seen other threads about the time zone, but the error seemed to be different but not sure if this is impacting the problem?

Can anyone help?

Many thanks

Fran W

12 REPLIES 12

Hi Fran,

Can you please share the screenshot of the Action stage where you are encountering the above error.

Regards,

Athiban

Hi,

You need to pass defer time in the DateTime dataitem format to make it work. See below example,

35717.png

I guess you are passing a text data item here.

Fran.Woodcock
Level 4

Hi Athiban, this is the action stage:

35718.png

If you evaluate your input you will notice it is in Text format and not in DateTime.

35720.png

Fran.Woodcock
Level 4

Hi Tejaskumar

Thanks, I saw that but it seemed to be an automatic setting and I can't see how to change it.  Is there a way to change it?

Thanks

Fran

As  others mentioned the defer until input parameter is expecting DateTime instead of text

So You can use calculation stage  to Convert text to dateTime before using in ADD to Queue Action

1) Convert text to DateTime in Cal stage


35721.png

Defer Until DataType should be DateTime
35722.png

2) In Add to Queue action  use Defer until  DataType in Input parameter 



-----------------------
If I answered your query. Please mark it as the Best Answer

Harish Mogulluri

Fran.Woodcock
Level 4

Hi Harish

Thanks for the steps, I have tried them and I get this error message:

35728.png

I have also searched You Tube and there was an option to use an Environment Variable but I cannot see how to set that to 'today' + 5 mins.

I then Tried to work out how to convert today's date and time + 5 mins from text to DateTime type but couldn't work it out. 

35729.png

35730.png

The expression is valid up to here, but when I validate, it still shows it as text.  It hen wanted to use a conversion function but as soon as I put this next to it, the initial expression section becomes invalid:

35731.png

I am not sure if I have just tried to do something that is too advanced for where I am in the training, but I can't really proceed without this working! I can't seem to find anything understandable to help work out how to use the functions and create expressions.  

Many thanks for your continued help with this!!

Fran

Hi Fran,

What is the data type you are using for "Time Today + 5 mins" and "Time Today + 5 mins converted"

I assume Time Today + 5 mins converted  data type you are using  is Date Time?

Looks like you have used some thing like this, with out space  after date
35735.png

Instead you need to use  this "12/07/2023 16:37"
35736.png

-----------------------
If I answered your query. Please mark it as the Best Answer

Harish Mogulluri

Hi Fran,

As mentioned by other members, your expression will result in text. Convert your expression to datetime to make it work. Refer the screenshot.

35738.png

Also deferring the items in work queue will be based on UTC to LocalTime. So, in order to defer the items to 5 minutes use the below expression. 

Now() + MakeTimeSpan(0,0,5,0)