Data is not getting saved in the custom fields and the fields are used in change form section tab

Pooja Khatri
Tera Contributor

Hi All ,

 

I have a requirement where I have created a custom table which has 3 fields which are of yes/no type and one field which is a reference field as field name = record number and it is referencing to the change request table . 

 

I am using this custom table in my change request table in the form as section , when I am entering the data for the 3 fields which are of Yes/No type it is not storing the data .. so when I enter the data and click on save button in the change request that data goes away .. I have created a reference field to the change request table with an agenda that the current change number I will map it in the field name = record number which is referencing to the change request table . 

 

I am assuming that once the change number of the current change request gets mapped with the field name = record number which is referencing to the change request table ,it will save the data on the 3 field which are of yes/no type in the section . 

 

Please if anyone can help me with the script to map the change number of the current change request  with the field name = record number which is referencing to the change request table when the change request is just opened ?

 

How can I implement this scenario ?

 

5 REPLIES 5

Robert H
Mega Sage

Hello @Pooja Khatri ,

 

ServiceNow does not work that way. You cannot create a record just by adding its fields to the form of some other record.

Why did you not add these 3 yes/no fields to the Change Request table itself?

If there is a reason to keep them in a separate table, create a Related List for it on the Change Request, and add yes/no information there, after you created the Change Request.

 

Regards,

Robert

Hi @Robert H - I did not wanted to create many fields on the change request table reason for it is performance and database indexing issues  and that is the reason I created a seperate custom table so in future if we want to use these fields in seperate table we can use the table in other tables too .

 

I want to implement this using a section only any idea how can I implement it with the above use case ? 

@Pooja Khatri 

 

As explained above, you can't. Use the new table as a Related List.

PS: adding fields to the Change Request table has no performance implications.

 

Regards,

Robert

Abhijit4
Mega Sage

Hi @Pooja Khatri 

 

As Robert mentioned you can have it as related list. However, if you still want it as part of section then you can add it as embedded list in section.

 

e.g. below is the OOTB conflict change table list on change table

 

Abhijit4_0-1746170359073.png

 

OR other alternative would be to take input from user via UI page and create record.

 

If my response helped please mark it as correct or helpful based on impact.

 

Regards,

Abhijit 

ServiceNow MVP

ServiceNow Buddy Owner: snbuddy.com

By marking my response as correct or helpful, you contribute to helping future readers with similar issues.
Regards,
Abhijit
ServiceNow MVP