Establish a reference from a catalog variable to a table located on a different instance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2024 12:30 AM - edited 09-16-2024 02:27 AM
Hi everyone,
I'm trying to reference a table from a different instance within a variable in my catalog item. The reference should point to the table itself.
https://xxx.service-now.com/now/nav/ui/classic/params/target/sc_cat_item_list.do
The scenario is that this catalog item will reside on the production instance. The manager should be able to prepare the catalog item on the test instance so that it can be staged to the production instance later. The reference to the other instance is necessary because the catalog item won't be available on the production instance yet. Subsequently, a change process will be triggered, and so on.
What configuration is required to access a table on a different instance through a reference? Could someone provide instructions on how to achieve this?
Any tips would be greatly appreciated.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2024 01:44 AM
Hey there!
So you're trying to reference a table from one instance while working on another? A classic "I want it here, but I also want it there" situation. Here's the deal: ServiceNow doesn’t support direct table referencing across instances (bummer, I know), but there are ways to get creative:
Use Integration Hub / REST API: You can set up an integration via REST APIs to pull data from the test instance into production. It's like a data teleportation trick – except it’s legit and not magic. You'll need credentials and an endpoint to call.
Staging Data: You can also set up a staging table in production, where the test instance dumps data temporarily via scheduled exports. Kind of like a halfway house for your data before it moves to its final destination.
Update Sets for the Win: Since you're prepping the catalog in test, make sure everything (tables, catalog items) gets captured in an update set. Think of it as packing a suitcase to move everything to production. Once you move it, voilà! It’s there.
Automate the Fun: Write a script to trigger the change process as soon as the catalog item lands in production, like setting off fireworks, but less dangerous.
Don’t worry, the manager will love the seamlessness. You? Well, you just became the ServiceNow magician. 🎩🐇
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2024 06:54 AM
wtf worst chat ai answer ever
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2024 04:08 AM
You need integration to access other instance data.
OnChange of variable...call to other instance by using REST API and once you receive the response ,parse it and update/delete accordingly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2024 11:55 PM
Thank you for your reply. I have followed all the steps you mentioned. I'm a newbie with scripted REST APIs, and as expected, it’s not working. There are multiple areas where the failure could have occurred. Hopefully, the structure is mostly correct. Here are the steps I followed:
- I created a scripted REST API on instance B, where I want to receive the catalog items. Here are the screenshots from the configuration.
2.I then created the variable on my catalog items with a reference to the sc_cat_item table.
3. After that, I created an onChange client script where I call the REST service from instance B.
Now, I need your help to provide further information. How can I see the records from instance B in my reference variable on instance A? I assume I need to query a staging table, and the records must somehow be provided from instance B to instance A. How can I achieve this?
Thanks for your help.