Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Is this possible to copy the table with the data?

2022_ServiceNow
Tera Expert

Hello everyone!

Is it possible to copy the existing table with the data and get the same table with the different name?

If possible, please let me know how to do the same..

Regards,

Priya

1 ACCEPTED SOLUTION

Thank you for the details.

I believe copying the table in this scenario would be highly discouraged because technically it would be different data altogether if you create a new table also, it would be hard to maintain it. Many other reasons as well.

I would suggest creating a new single line text variable and populate the value you want to display for one of the reference field into that using script and hide the reference variable using the UI policies once the request is submitted. That way one reference variable will be on the form with its actuall display value and single line readonly variable with the other display value that you want.

Please see details Multiple Reference Display values

Regards,

Muhammad

Regards,
Muhammad

View solution in original post

13 REPLIES 13

Mahendra RC
Mega Sage
Hello Priya, You have to create a new table and then move the data from existing table to new table using some script and then delete the existing table. You cannot chane the name of the table. Thanks

Arav
Tera Guru

Hi,

Please check the knowledge article below.

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0656519

Btw, is your ServiceNow instance on cloud or on premise ? If it's the latter, I can suggest additional options.

Thanks,

Arav

Hi,

I've gone through this article. I'm using the PDI.

Thanks,

Priya

MrMuhammad
Giga Sage

Hi Priya,

Can you elaborate on your use case, please? What's the reason for copying a table and especially which table (Name) do you want to copy?

Custom tables are incurred to license (few are exempted) so it is very important to understand why the new table is required before creating that table. 

Please explain so that community can suggest the best possible solution.

Regards,

Muhammad

Regards,
Muhammad