Can't find the macro activity.xml

maryam_stitou
Kilo Explorer

the aim is to create a Formatter that have the same properties as Activities(filttered).

 

the wiki says to override it, but it does not work. So I tried to find the macro used by Activities but I can't find it.

 

Can somebody help me to find this macro, or to propose an other way to fix this issue.

4 REPLIES 4

swilson
Tera Expert

Hi, Maryam. The 'activity.xml' macro is actually an xml file which you don't have access to from your instance. You can create a new formatter for a different table by copying an existing one and changing the table. As long as the table you're using it on is being audited (ie.changes are being tracked) then the delivered 'activity.xml' file should work.



Thanks.


- Steve


Hello Steve;



Thank you for you're answer. I tried the solution you gave me, but it didn't work.



I created a formatter by copying an existing one (activities (filtered)) but each time I tried to put both formatter (the original and the copy) in the same page, it only displays one.



Have you a model of a source code that I can use? Can I use XLST to code it.



Regards.


Hi, Maryam. You can't put more then one activity formatter on a form. The first one it finds will be displayed and the others will be ignored. It's a note at the bottom of this wiki article section http://wiki.servicenow.com/index.php?title=Activity_Formatter#Creating_an_Activity_Formatter



As for XLST I don't believe ServiceNow supports it. You can create your own ui macros using jelly scripting and reference those in the formatter. Your own ui macros/formatters can be added to a form in addition to the activity formatter.



- Steve


> You can create a new formatter for a different table by copying an existing one and changing the table.



I'd like to copy the `activity.xml` formatter, unfortunately, there's no access to it.



Is there read only access so I can copy it to tweak it?