The Now Platform® Washington DC release is live. Watch now!

ヘルプ
キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Error : attempting to use undefined input = 'current' from MY_SUB_FLOW_NAME What is this error?

Kawanabe Shinta
Kilo Contributor

hi.

I tried the following code.

 
var latest_comment = fd_data.trigger.current.comments.getJournalEntry(1);
return latest_comment;​
 
But it didn't work.

That's because I got the following error.
 
Error : attempting to use undefined input = 'current' from MY_SUB_FLOW_NAME
 
What does this error mean?
 
What should i define?

I'm writing this in a flow designer.
I want to get the latest additional comment in the resolution memo.
 
Please lend me your wisdom.
thank you.
 
1 件の受理された解決策

Geishin Ro
ServiceNow Employee
ServiceNow Employee

Hi, if you use sub flow, you will need to define Inputs in the sub flow so that the main flow can pass the incident record to be updated to the sub flow. The "current" variable does not work in sub flow.

1. In the sub flow, define the input as Target incident record - for example.

find_real_file.png

2. In the main tab, you would need to pass the incident record to the sub flow's Target incident record input. 

find_real_file.png

BTW, maybe you can consider putting the update logic(script) in the main flow, which will make life much easier. 

元の投稿で解決策を見る

2件の返信2

Geishin Ro
ServiceNow Employee
ServiceNow Employee

Hi, if you use sub flow, you will need to define Inputs in the sub flow so that the main flow can pass the incident record to be updated to the sub flow. The "current" variable does not work in sub flow.

1. In the sub flow, define the input as Target incident record - for example.

find_real_file.png

2. In the main tab, you would need to pass the incident record to the sub flow's Target incident record input. 

find_real_file.png

BTW, maybe you can consider putting the update logic(script) in the main flow, which will make life much easier. 

Geishin Ro
ServiceNow Employee
ServiceNow Employee

Please remember to Publish the sub flow after modifying it, so that the main flow can see the changes. Good luck!