Error in Flow using date to string transform function

Bidduam
Tera Guru

I have created a flow, there are two variables that are Date fields (not date/time fields).

 

I have added those date variables to a add a comment flow and used the transform function on the variables to convert the date to a string. However I keep getting this error no matter what I try.

Error in executing transformer date_to_string

Error Message : Custom date format cannot be blank
Input value :
Parameters : {date_format=NULL_OVERRIDE, custom_format=dd/MM/yyyy}
 
The date format we use looks like this - 22/11/2023 (dd/MM/yyyy)
The error in the flow looks like this:
Bidduam_0-1700633562172.png

 

The way the transform function is currently setup is:

Bidduam_1-1700634815622.png

Both fields are setup the same way.

 

I can see nowhere that I can set the input date if that is needed?

 

Help please

1 ACCEPTED SOLUTION

Oh I see what you are saying. Didn't realize from initial question that this was on a catalog item.
Not having the full visibility to your flow, but I would suggest based on my understanding :

After its added in step 22, can you get the date values to be passed to comments from the sc task record once its updated because it definitely won't work if it is trying to access the values from 1st activity when the values were not actually updated.

Alternately, also try to again include a get catalog variables action after the update, if getting it from the related sc task is not possible. This is because, after the update 'get catalog variables' should fetch the date values.

Please try once.

Consider indicating the response as helpful and marking it as correct if it meets your needs.

View solution in original post

8 REPLIES 8

@Bidduam ,

So as per the screenshot, log is the 23rd activity, can you backtrack it somewhere before this 23rd step so as to know if we are seeing the values in any of the previous steps.

Also, can you please provide screenshot for dictionary configuration of these two fields?

Consider indicating the response as helpful and marking it as correct if it meets your needs.

@Sonam_Tiwari 

I can't check the dictionary I don't believe on these fields they are both standard date variable fields on a catalog item.

 

As you can see here, they have a value once added in flow step 22:

Bidduam_1-1700709255376.png

 

 

They are set to only display on a task and in the flow they are only added to the sc_task created at flow 22, which is why the log was at 23. Before 22 the fields have no value added to them at all by anything.

 

Having said that I added logs for flow steps 2 and 9 and they still showed as being empty:

Bidduam_0-1700709219891.png

 

Oh I see what you are saying. Didn't realize from initial question that this was on a catalog item.
Not having the full visibility to your flow, but I would suggest based on my understanding :

After its added in step 22, can you get the date values to be passed to comments from the sc task record once its updated because it definitely won't work if it is trying to access the values from 1st activity when the values were not actually updated.

Alternately, also try to again include a get catalog variables action after the update, if getting it from the related sc task is not possible. This is because, after the update 'get catalog variables' should fetch the date values.

Please try once.

Consider indicating the response as helpful and marking it as correct if it meets your needs.

That is excellent thank you and makes sense, when I got the variables at the start they were empty and obviously their value doesn't update later when they are filled in as I've already got their values (blank ones at that)

 

So yes I added a 'get catalog variables' directly after the dates were filled in, then converted the values to strings when I added them to a comment on the RITM and it works 100% as wanted.

 

Thank you very much @Sonam_Tiwari for your help and patience!

Bidduam_0-1700714494379.pngBidduam_1-1700714511907.pngBidduam_2-1700714528330.png