Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Splitting Work Notes with Flow Designer

lonesoac01
Giga Guru

Hello all,

 

I am attempting to clean up the work_notes data in Flow designer.  I can get the plain version of work_notes by just pointing the Flow towards that field and I am given:

 

TimeStamp Data Andrew Stringfield (work notes)
"Andrew Stringfield did things"

 

When I try to split the string value and just get the:

"Andrew Stringfield did things"

I get the result of:

com.glide.glideobject.Journal@1413743

 

In the Field functions I am using the

Split function first and it is looking for the value of: (work notes)\n

And then I am using the "last item in array" function

 

What am I missing?

1 ACCEPTED SOLUTION

I ended up creating a Before BR that does what I was trying to do with Flow designer.  Here is what I ended up doing:

 

    var worknote = current.work_notes.getJournalEntry(1);
    gs.addInfoMessage(worknote);
    var worknoteContent = worknote.split("(Work Notes)\n");
	// I HAD to do a for loop to access the [1] value of the worknoteContent array object.  I tried to
	// access it directly, but for whatever reason, SN was not having it...
    for (var i = 0; i < worknoteContent.length; i++) {
        if(i == 1) {
			current.close_code='cancelled';
			current.close_notes = worknoteContent[i];
        }
    }

 

View solution in original post

4 REPLIES 4

Elijah Aromola
Mega Sage

Can you provide a screenshot of your config in flow designer?

I ended up creating a Before BR that does what I was trying to do with Flow designer.  Here is what I ended up doing:

 

    var worknote = current.work_notes.getJournalEntry(1);
    gs.addInfoMessage(worknote);
    var worknoteContent = worknote.split("(Work Notes)\n");
	// I HAD to do a for loop to access the [1] value of the worknoteContent array object.  I tried to
	// access it directly, but for whatever reason, SN was not having it...
    for (var i = 0; i < worknoteContent.length; i++) {
        if(i == 1) {
			current.close_code='cancelled';
			current.close_notes = worknoteContent[i];
        }
    }

 

Were you able to get it resolved? 

Yes.  The above code is the solution that I came up with.  It makes no sense, but hey it works.