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

Sonam_Tiwari
Kilo Sage

Can you try to add a log action before passing in comments to see what values for date variables are coming from the 1st activity which are then being transformed in comments.

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

@Sonam_Tiwari 

 

I added the following to the Flow:

Bidduam_1-1700696604159.png

It has been added immediately after the date fields have been updated and immediately before the dates are trying to be converted to a string and updated in a comment.

 

This is what has shown in the log:

Bidduam_0-1700696539385.png

 

Its empty before its being passed as input to, and being transformed in comments update which I believe is the reason is giving this error mentioned above. If it has been added immediately after the date fields have been updated then ideally we should be seeing those updated dates in the log. 1st thing is to fix why its empty than to check why there is error in conversion of dates to string.

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

@Sonam_Tiwari ok thanks, but how do I make it so it is not empty?

The fields have a value in them, they are updated manually in a sc_task, then saved.

 

I have no idea why they are 'empty' and therefore no idea how to make them not empty.