How do I populate a field with an Existing DateTime field in Flow Designer

zag
Tera Expert

So I have this issue where I want my Resolved_at  datetime field equal my Closed_at date time field.  Closed_at is always populated. 

my script is 


var cldt = new GlideDateTime(closed_at);
return cldt;
 
but getting an error Error: "closed_at" is not defined.,Detail: "closed_at" is not defined.
 
Any thoughts
1 ACCEPTED SOLUTION

Allen Andreas
Administrator
Administrator

Hello,

In the future, please give as much information as you can. Meaning, include the table that this flow is on, what you have tried already, what problems you're having, is there any errors, what troubleshooting have you done?

It seems we're having to sort of ask for these things, unfortunately, which causes a bit of delay for you to get your result and depending on the answers to some of those above questions, the approach varies.

Please mark reply as Helpful, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

View solution in original post

9 REPLIES 9

Vinayak Belgaon
Mega Guru
Mega Guru

Allen is right with the approach on how you should do it. The issue with your script is you are missing the current glide variable  

 

var cldt = new GlideDateTime(current.closed_at); //fd_data.trigger.current.closed_at if you are using flow designers.
return cldt;
 
Please mark reply as Helpful/Correct, if this resolved your query
 
Regards
Vinayak

Allen Andreas
Administrator
Administrator

Hello,

In the future, please give as much information as you can. Meaning, include the table that this flow is on, what you have tried already, what problems you're having, is there any errors, what troubleshooting have you done?

It seems we're having to sort of ask for these things, unfortunately, which causes a bit of delay for you to get your result and depending on the answers to some of those above questions, the approach varies.

Please mark reply as Helpful, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

your right , I just assumed this was a simple issue and didn't want to make everyone read a novel first.

Hi,

Haha, totally understandable, but a few more small pieces like the table(s) involved isn't too bad to include. I believe you said the record was on one table and the field you're trying to get the closed_at value is from another?

So that makes it a bit more complex to do and we'd love to have you use a no-code solution, versus scripting, if at all possible.

Thanks!

 


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

I figured it out, thanks for your help Allen