- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2014 07:42 AM
Hi everyone,
We're running into some issues where we are storing data between CMDB and another external database. That DB is pulling information from the CMDB, however it was discovered that if we have a name change regarding an application, it would not recognize that it was updated and could cause some issues. What we were thinking the fix could be would be to have a field that populates that application's sys_id, so they can reference that instead of the name. It's proving to be a bit difficult from what we've seen however I don't think it should be as the sys_id is readily available in URLs etc. Does anyone know how we can populate the sys_id into a field?
Thank you,
Amandah
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2014 07:46 AM
Amandah,
If you want to populate sys_id to a field and want the field to have the name as display value.
g_form.setValue('<fieldname>', <sys_d>);
this field where you are populating the sys_id should be a reference to that table whose record you are showing, in your case cmdb_ci.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2014 07:46 AM
Amandah,
If you want to populate sys_id to a field and want the field to have the name as display value.
g_form.setValue('<fieldname>', <sys_d>);
this field where you are populating the sys_id should be a reference to that table whose record you are showing, in your case cmdb_ci.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2014 07:50 AM
Hi Anurag,
That's great, thanks! Quick question though, would this script be put directly into the field itself somehow or would it be a separate client script? It would easily reference each individual record from there? I feel like this may be a bit of a stupid question but just figured I'd clarify!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2014 07:51 AM
onload client script or onload ui policy would do.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2014 07:53 AM
That's perfect - thank you so much! I'll give it a try.