how can i get to only latest additional comment in flow designer?

Kawanabe Shinta
Kilo Contributor

how can i get to only latest additional comment in flow designer?

Hi 🙂 thank you for watching.

We manage incidents in cooperation with google chat.

Then, when the status is set to resolved, I want to write the latest additional comment in the resolution memo.

I thought that I should arrange it with the split function and extract only the first item,

but I could not arrange it because it became [com.glide.glideobject.Journal@xxxxxxx].


Please lend me some wisdom.

thank you.

1 件の受理された解決策

Hi, please can you try below? This is what Mark talked about.

find_real_file.png 

元の投稿で解決策を見る

8件の返信8

Hi, Looks like you do not have a sufficient role. Please take a look at the below and see if it will sort things out. But if you already have an admin role, I would recommend you raise a ticket in HI(support) to find out why.

Access to inline script

You can grant users access to inline scripting by either granting them the flow_designer_scripting role or the Allow Scripting delegated development permission. Both the role and the developer permission display a script button field for each Flow Designer input.

https://docs.servicenow.com/bundle/rome-servicenow-platform/page/administer/flow-designer/concept/inline-scripts.html

hi 🙂

I can now write scripts.

thanks a lot my dear.

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 is this error?
 
 

Sohail Khilji
Kilo Patron
Kilo Patron

Hi @Kawanab,

 

You can make use of comments.getJournalEntry(1);

This will give you the last entered journal entry,

 

You can make use of comments.getJournalEntry(-1);

This will give you all the journal entrys which are added to the record.

 

Kindly mark the answer correct or helpful if it addresses your concern...


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect