Adding Tags to an Issues Does Not Update sys_updated_on

Max Gong
Tera Contributor

I am working on an app that incrementally pulls data from the ServiceNow API. Specifically, I am calling the following endpoint: /now/table/incident (https://docs.servicenow.com/bundle/washingtondc-api-reference/page/integrate/inbound-rest/concept/c_...

 

I am doing incremental loads by passing a query parameter of "sysparm_query= sys_updated_on>{some_timestamp}". What I have found is that if I add a tag to an incident, the incident object is not marked as updated by ServiceNow (ie, sys_updated_on does not change).
 
Is this expected? Is there a way to determine what changes will update the sys_updated_on timestamp? 
5 REPLIES 5

AshishKM
Kilo Patron
Kilo Patron

Hi @Max Gong , 

Tags are stored in table [ label ] and not updating the record, if you check the task/incident table, you will not find the tag column listed there. 

You have to think some other alternate for this.

 

https://docs.servicenow.com/bundle/washingtondc-platform-user-interface/page/use/common-ui-elements/...

 

 

-Thanks,

AshishKM


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

Hey AshishKM! Thank you for your response.

 

I might be confused, I do see the sys_tags column listed both in the docs as well as in the schema map.

 

MaxGong_0-1708617094087.png

 

MaxGong_1-1708617249795.png

 

I suppose this is a reference field, but it still seems to exist as a column on the incident object! Maybe I am still misunderstanding. 

I agree with you, after reading your query, I tried to learn more on Tags configuration and it's type but tables are not showing this Tags column. 

 

Created/Tested some tags at my end and main record not updated.

Deleted the created tag and found that tag is still showing active = true. 

 

AshishKMishra_0-1708619394569.png


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

Aman Kumar S
Kilo Patron

Hi @Max Gong 

Its an expected behavior, changing tags doesn't update the records.

Why do you want to explicitly update the record, do you have some any logic that you want to implement, and need the form to be updated, you can use setForceUpdate(), it will update no actual fields on the form, except:

sys_mod_count
sys_updated_by
sys_updated_on

For better understanding,refer to SN docs:

https://docs.servicenow.com/bundle/vancouver-api-reference/page/app-store/dev_portal/API_reference/G...

 

Best Regards
Aman Kumar