The CreatorCon Call for Content is officially open! Get started here.

Table API setting empty values a scenario?

Kiddy
Tera Guru

Hi folks,

I am using Table api Post to create Incident

I am facing issue when i pass assignment group in the payload inc gets created with empty CI,Assignemnt group and parent

when i remove Assignment group from payload everything works CI and parent gets populated for with same data

Believing assignment group is culprit i tried creating manually and through background script ,its working perfectly fine with same data

 

how can i further troubleshoot Table Rest api to get the root cause of this behavior

 

i am using below json payload

Doesnt work gives parent,CI,Assignment group empty, creates incident but with empty CI,AG,Parent

{
"caller_id": "SysId",
"short_description": "Test Ticket ",
"description": "Test Ticket ",
"assignment_group": 'SysId',
"cmdb_ci": 'SysId',

"parent":"SysId"
}

 

works fine and create inc with data

{
"caller_id": "SysId",
"short_description": "Test Ticket ",
"description": "Test Ticket ",
"cmdb_ci": 'SysId',

"parent":"SysId"
}

9 REPLIES 9

@Kiddy I just tried in my PDI, it is working. Some steps to troubleshoot:

 

Check if the group sys_id is correct.

Check the reference qualifier for your assignment group field, it could be in dictionary override.

Any server side script or data policy restricting assignment group addition from APi as it is working from background script.

Check if something is getting is sys_log when you try this scenario.

Use script tracer to further troubleshoot if nothing helps.

Try PUT method and see if you are able to update the existing incident, this will hep to understand if issue is at inert or update or both.


Please mark the answer correct/helpful accordingly.

 


Raghav
MVP 2023
LinkedIn

Bhuvan
Mega Patron

@Kiddy 

 

Check for any onChange client scripts or Business Rules or any other scripts that checks for condition Assignment Group changes and resetting field values. This is not out of box behavior and it must be customization at your end.

 

You can enable Script Tracer and monitor session logs and send a test payload to understand what is causing the issue.

 

If this helped to answer your query, please mark it helpful & accept the solution. 

 

Thanks,

Bhuvan

@Kiddy 

 

Did you get a chance to review this as I believe the information provided should answer your question.

 

As per community guidelines, you can accept more than one answer as accepted solution. If my response helped to answer your query, please mark it helpful & accept the solution.

 

Thanks,

Bhuvan

kaushal_snow
Mega Sage

Hi @Kiddy ,

 

Ensure that the Sys ID you're passing for the assignment_group is valid and corresponds to an existing group in the sys_user_group table. An invalid or non existent Sys ID can cause the related fields to remain empty....and second is If there are reference qualifiers set on the assignment_group field, they might be restricting the available options. Review any reference qualifiers applied to the assignment_group field to ensure they aren't unintentionally filtering out valid groups...

 

Try testing your API request in postman...

 

If you found my response helpful, please mark it as ‘Accept as Solution’ and ‘Helpful’. This helps other community members find the right answer more easily and supports the community.

 

 

 

Thanks and Regards,
Kaushal Kumar Jha - ServiceNow Consultant - Lets connect on Linkedin: https://www.linkedin.com/in/kaushalkrjha/

nityabans27
Giga Guru

Hi @Kiddy,

  1. Fix JSON (double quotes).

  2. Check logs for error messages or field-clearing.

  3. Review assignment rules/business rules tied to assignment_group.

  4. Test two-step insert (create, then patch).

  5. If confirmed, adjust business rule or assignment rule that resets CI/parent.