CIS-SM practice question 23 of 25

When using Pattern Designer, which one of the following best describes a variable $proxy_urls[+].host?

Full set: 106 questions
Answer options
A: The proxy_urls value for the first row of the host table
B: The proxy_urls values from all rows of the host table
C: The host field values from all rows of the proxy_urls table Correct answer
D: The host field value for the first row of the table proxy_urls
Correct Answer:
C. The host field values from all rows of the proxy_urls table
Explanation

In ServiceNow's Pattern Designer, the syntax $variablename[+].fieldname is used to manipulate data stored in table variables. The $ indicates a variable. proxyurls is the name of a table variable created in a previous step. The [+] operator acts as an iterator, instructing the pattern to traverse all rows within the proxyurls table. Finally, .host specifies the selection of the value from the 'host' column for each row that is iterated over. Therefore, the expression collects an array of all 'host' field values from every row in the proxyurls table.

Why Incorrect

A. The proxyurls value for the first row of the host table: This is incorrect. The table is proxyurls, not host. The [+] operator refers to all rows, not the first row.
B. The proxyurls values from all rows of the host table: This incorrectly identifies host as the table name. The expression specifically extracts values from the host column of the proxyurls table.
D. The host field value for the first row of the table proxyurls: This is incorrect. The [+] operator is used to iterate over all rows. Accessing only the first row would typically use an index, such as [1].

References

1. ServiceNow Product Documentation: Use variables in patterns.

Reference: In the "Refer to values in a table" section, the documentation explicitly states: "To refer to a value from a specific column in all rows of a table, use this syntax: $tablename[+].columnname". This directly validates that $proxyurls[+].host retrieves the host field values from all rows of the proxyurls table. (Accessed on the Washington release documentation).

Scroll to Top