I am doing a Cityworks and Problem Reporter (AGOL) integration. I have set up two-way communication between both services but when a comment is added in Cityworks it populates the comment field in the public feature layer of Problem Reporter with a lot of extra information that is not needed.
If I need to add a new field, Comments_public for example, I'm okay with that. I would like for only the actual comment to show up in the comment field instead of listing the employee, date and time as it is showing currently.
I was able to do the above in excel using the formula: =RIGHT(A2,LEN(A2)-SEARCH(":",A2)-9)
However, I have yet to figured out a way to do it using Arcade. I found a formula that got me close (shown below) but unfortunately I got everything up to the first " :" (By Lukas, Ari 1/11/2022 3) instead.
var array = Split($feature.StaffComments, ":");
if (Count(array) ==2) {
return Trim(array[1]);
}
else {
return Trim(array[0]);
}
Any assistance would be greatly appreciated!