Unable to populate date variable with flow designer

sumedhg
Tera Contributor

Hi All,

 

I am trying to populate a date variable from a date field of a custom table by 'submit a catalog item request' action.

But the date variable is empty after the flow is executed.

Other variables are populated as expected but the date variable is empty.

 

sumedhg_0-1692264755727.png

 

4 REPLIES 4

Karthiga S
Kilo Sage

Hi @sumedhg 

 

Please ensure that the date format of the field in the custom table matches the date format of the variable in the catalog item. ServiceNow uses the format 'yyyy-MM-dd' for date fields.

 

Please mark it Correct and Hit Like if you find this helpful!

 

Regards,

Karthiga

Sruthi17
Kilo Sage

Hi,

 

Please check the date format and also ensure the expire date from the custom table has run time value.


Please accept solution or helpful, if you find it helpful.

 

SwarnadeepNandy
Mega Sage

Hello @sumedhg,

 

You can also check in the executions of the flow to check if there is any value in "Expiry Date" variable or not.

If the data pill "Expiry Date" is empty then nothing you can do.

 

Kind Regards,

Swarnadeep Nandy

Aitor Cabello
Tera Expert

Hi,

 

What I did before assigning it as an input to a date-type catalog variable was the conversion.

 

How did I do this?

 

In set flow variables:

 

var gdt = new GlideDateTime(fd_data._3__for_each.item.*YOUR_VARIABLE*);
var dateString = gdt.getDate().getValue(); // only get "YYYY-MM-DD"

return dateString;
 
Regards.