Don't copy {noformat} - I believe this is a splunk answers formatting directive. Just start copying with the "| rest..." and end at "...| where isnotnull(errmsg) AND ignore=0".
I compared the old and the new command. Somewhere near the middle of the string you had:
OLD:
... started=if(key=="time closed", value, started), stopped=if(key=="time opened", value, stopped) ...
And after copying you have:
NEW:
... started=if(key=="time opened", value, started), stopped=if(key=="time closed", value, stopped) ...
Just the bold words were changed.
... View more