{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":167,"path":"api-reference/StandaloneClientMethods.md","title":"StandaloneClientMethods","bundle":null,"doc_type":null,"release":"australia","body":"\n# StandaloneClientMethods\n\nStandalone client methods are methods that you can use within your client JavaScripts, such as reflistOpen, but aren't a part of any class or API.\n\nYou can directly access these methods within a client script without any constructor or other type of instantiation before use.\n\n**Parent Topic:**[Client API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/api-client.md)\n\n## Standalone - reflistOpen \\(String target, String elementName, String refTableName, String dependent, String useQBE, String refQualElements, String additionalQual, String parentID, String forceReference, String ignoreTargetValue\\)\n\nShows the reference field data in a standard pop-up window. This method is commonly used when selecting a magnifying glass icon, beside any reference field, in UI 16 forms.\n\nFor example, using this method you can display reference field data for a specific set of query criteria:\n\n\\[Omitted image \"reflistOpen\\_popup\\_image1.png\"\\] Alt text: Ref data in pop-up window\n\nSimilarly, you can use this method to display a search form that enables the user to enter their own set of query criteria for selecting the reference field data to display.\n\n\\[Omitted image \"reflistOpen\\_popup\\_image2.png\"\\] Alt text: Search in pop-up window\n\nWhen opening the URL in the standard pop-up, if the URL length is greater than TinyURL length, 1024 by default, the URL is converted to TinyURL, such as:\n\n`\"sys_user_list.do?sysparm_tiny=7ea02c4ff8a8b510f877c74d78b60460\"`.\n\n**Note:**\n\nreflistOpen\\(\\) isn’t supported in Workspace Client Script. Use the g\\_modal.showFrame\\(\\) method instead.\n\n<table id=\"table_sx2_hgs_nyb\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ntarget\n\n</td><td>\n\nString\n\n</td><td>\n\nForm target reference field ID.For example, the `caller_id` parameter's target reference field ID is `incident.caller_id`.\n\n</td></tr><tr><td>\n\nelementName\n\n</td><td>\n\nString\n\n</td><td>\n\nForm reference field element name. For example: `caller_id`\n\n</td></tr><tr><td>\n\nrefTableName\n\n</td><td>\n\nString\n\n</td><td>\n\nReference table to map to the form reference field. For example, for the reference field `caller_id`, sys\\_user is the reference table. In this case, you would pass the value `sys_user`.\n\n</td></tr><tr><td>\n\ndependent\n\n</td><td>\n\nString\n\n</td><td>\n\nConfigured dependent field for the specified **target** element. For additional information, see [Make a field dependent](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-administration/t_MakingAFieldDependent.md).\n\n</td></tr><tr><td>\n\nuseQBE\n\n</td><td>\n\nString\n\n</td><td>\n\nFlag that indicates the type of information to return in the pop-up window.Valid values:\n\n-   true: Display a query form with a search button.\n-   false: Display the query results.\n\nDefault: false\n\n</td></tr><tr><td>\n\nrefQualElements\n\n</td><td>\n\nString\n\n</td><td>\n\nConfigured reference qualifier for the specified **target** element. The function appends the specified reference qualifiers to the URL and only displays the filtered results in the pop-up window. If you don't want to include a reference qualifier, pass an empty string.For additional information on reference qualifiers, see [Reference qualifiers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-administration/c_ReferenceQualifiers.md).\n\n</td></tr><tr><td>\n\nadditionalQual\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Additional qualifier query to use to filter the results that display in the pop-up window.For example, for a `caller_id` reference field in an incident, you could pass the user's sys\\_id `sys_id=62826bf03710200044e0bfc8bcbe5df1`.\n\nThe function filters the User \\[sys\\_user\\] table and shows the filtered results in the pop-up window.\n\n</td></tr><tr><td>\n\nparentID\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Currently only an internal parameter, no need to pass a value.\n\n</td></tr><tr><td>\n\nforceReference\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Currently only an internal parameter, no need to pass a value.\n\n</td></tr><tr><td>\n\nignoreTargetValue\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Currently only an internal parameter, no need to pass a value.\n\n</td></tr></tbody>\n</table>|Type|Description|\n|----|-----------|\n|Pop-up window|Displays the returned reference field data in a standard pop-up window.|\n\nThe following example shows how to invoke this method to show the caller field data in the pop-up window for the incident table \\(first image above\\).\n\n```\nfunction onChange(control, oldValue, newValue, isLoading, isTemplate) {\n   if (isLoading || newValue === '') {\n      return;\n   }\n\n   reflistOpen('incident.caller_id', 'caller_id', 'sys_user','company', 'false', '');\n}\n```\n\nThe following example shows how to invoke this same client script, but with `useQBE = true`, which displays a search button and associated search criteria within the pop-up window \\(second image above\\).\n\n```\nfunction onChange(control, oldValue, newValue, isLoading, isTemplate) {\n   if (isLoading || newValue === '') {\n      return;\n   }\n\n   //  Type appropriate comment here, and begin script below\n   reflistOpen('incident.caller_id', 'caller_id', 'sys_user','company', 'true', '');\n}\n```\n\n"}}