Certified Implementation Specialist Discovery CIS Discovery · Free Practice Question Medium

Question 5

Which of the following statements are true for the below value:

$name_details[1].exec_info+"-"+$process.executableDir

  • A

    There is a scalar variable labeled "1".

  • B

    It is not possible to use this value in a pattern step.

  • C

    "name_details" is a tabular variable.

  • D

    This value comes from a WMI query operation step.

Reveal correct answer

Correct answer: C

Explanation

Source: Documentation (screenshot)


Correct Answer: "name_details" is a tabular variable.



In ServiceNow Discovery, the "name_details" in this context refers to a tabular variable that can hold multiple rows of data. This is similar to an array in programming languages.


Why other answers are incorrect:


  • "There is a scalar variable labeled '1'": This statement is incorrect. The '[1]' here refers to an index in the 'name_details' tabular variable, not a scalar variable labeled '1'.

  • "This value comes from a WMI query operation step": This is incorrect as the statement doesn't provide enough context to definitively say that this value comes from a WMI query operation step. ServiceNow uses WMI for discovering information on Windows systems, but this specific line could be part of many different types of pattern steps, not necessarily a WMI query.

  • "It is not possible to use this value in a pattern step": This is incorrect. This kind of value can certainly be used within a pattern step in ServiceNow. Patterns often use variables and indexed values from those variables to discover and map specific attributes of CIs.


Consider it like this, "name_details" could be seen as a big spreadsheet (tabular variable), and "[1]" is like saying "give me the information in row number 1". So this is not calling a separate variable labeled "1", but retrieving data from the "name_details" spreadsheet. The "+" sign is used to concatenate (join together) the information from "name_details" and "$process.executableDir". This could be part of many steps in Discovery patterns and is a common practice.

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need