Get RITM number attached to Change request in Service Now - servicenow

I am trying to get the Request number (RITM) that is attached in the Change Request (CR) in service now. I am able to get the Request number but not able to get for which Change Request the corresponding Request number is attached. I have used the table "sc_req_items" to get the Request number and "Change_request" table to get the Change request number.
Service now screenshot
I need the ritm number corresponding to the Change Request (CR) in the screenshot. how to get this?

There is a Out Of The Box/Baseline Related list available on the Change Request table. The query that this Related List is using is the Parent field:
parent=<sys_id/GUID for the change record>^.
If Parent (reference field) is not the link between your objects then you need to map what the link is, is it another field or an m2m table.

Related

I want to fetch ID based on provided name from api which returns both. I want to store this ID which will be used in another request

This api returns me dashboard_id and dashboard_name as highlighted in attached image. My requirement is to fetch dashboard_id based on dashboard_name using this api in jmeter? Both ID and Name are unique here. Is it possible to achieve this in jmeter?
Since we do not have any api which will return me dashboard_id based on dashboard_name. So wanted to use this current api which has both ID and Name, and based on Name I want to fetch ID, and ID will be used in different request.
Using Jmeter, I am providing user credentials and dashboard_id via 'CSV Data Set Config' that is being used in request, but too many ID's are confusing, so better we want to use dashboard_name which is more readable and add current api from where we want to fetch ID, so that ID can be used in another request.
I was trying to go though Beanshell Sampler to achieve this, but still didn't find a way to achieve it. Please suggest me a way to achieve this in jmeter?
You can use JSON Extractor and the following JsonPath query:
$..[?(#.name == 'New Dashboard - 6')].dashboardId
Full configuration:
You should be able to refer the extracted id as ${dashboardId} where required.
Going forward please:
Don't post code as image
Post the code fully
Don't use Beanshell as it's performance anti-pattern

Can we update any fhir resource on the basis of patient id?

I am trying to update Encounter resource on the basis of patient id but it is only creating one new record of Encounter rather than updating the existing one. But if i try to update Encounter on the basis of identifier i.e. unique value representing Encounter resource then it is able to update it.
Why is that? Can anyone explain?
One patient will potentially have many (even hundreds) of encounters. Updates are always driven by the record of the resource itself - every resource (Patient, Encounter, Observation, CarePlan, etc.) has an 'id' element that represents the identifier of that resource on that particular server - sort of like a primary key. Updates are performed by making a RESTful PUT of the new record to a URL that includes that same identifier.
I.e. an update of an Encounter MUST always be performed with a URL of the form:
PUT [somebaseurl]/Encounter/[serverEncounterId]
The patient associated with the encounter will be referenced from within the Encounter object in the body of the RESTful call, but does not appear in the URL.
As you have discovered, some FHIR servers will allow a 'conditional update':
PUT [somebaseurl]/Encounter?search_key=search_value&...
You will need to add search parameters that filter all Encounters and result in a unique one, which will then be updated. Since, as Lloyd also indicated, a Patient can have multiple associated Encounters, the Patient id is not a suitable parameter for the conditional update. Your Encounter's identifier was unique enough, so that update succeeded.

How to fetch the variable value in service now when ordering item from service catalog?

I have successfully ordered an item from service catalog using REST API. While ordering I sent a JSON data in the request body containing certain key value pairs which are meant to be stored in variable of the catalog item. After the successful order, the response generated contains the sys_id, request_number, request_id, table name. Now, when I want to fetch the values passed to variables, the only way available is to make a GET call using the REST API for Tables. So, I am fetching the record using the generated sys_id and table name which is generated as response of order API. The table name is sc_request.
But that is not providing the variable value information in the response body of the GET call.
You should be able to get the values of variables using the Table API. If you go to the REST API explorer in ServiceNow, notice the field "sysparm_fields". put the name of your variabe(s) in there like this "variables.var_name". This will retrieve their values and display values in the response.

What is this Okta API pagination next value?

I am using Okta for SSO. I want to list all Okta users, but the API has a max limit of 200. So I need to use pagination here.
Initial I used the URL
{{url}}/api/v1/users?limit=200
Not I got the response with the first 200 users, and a next link in the response header. The next link was like
{{url}}/api/v1/users?after=1uid&limit=200
Please have a look at the above after value. Character 1 got prepended to the last user ID. Why is that?
The after parameter value is a cursor, not a user ID. From the Okta API docs,
Pagination is based on a cursor and not on page number. The cursor is opaque to the client and specified in either the before or after query parameter.
Your value looks like a user ID, but the cursor structure could change in the future. The proper way to handle the cursor is to simply follow the next link in the response header. Your code shouldn't need to try to parse or understand the contents of the next link.

GSA feed - adding multiple documents to a single record

I am working on a product catalog whose search is powered by GSA. Each product is a single entry, but may have many associated documents. As I see there is only one content node allowed in the feed XML. is there a way to add multiple files to same record in the feed xml? Any suggestions?
Your best bet is going be when submitting each record to the feed, is to extract the content of associated documents and add as additional meta-data before sending to the feed.
Alternately, you can submit each record and each document, with some meta-data that references the record it's associated with. When returning search results, you could customize the front-end results to display related content (records or other attached documents).
You can try additional document content into new metadata(1500 char limit) or document body.

Resources