<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Trying to use Table REST API to query variable values for a request in Community Central forum</title>
    <link>https://www.servicenow.com/community/community-central-forum/trying-to-use-table-rest-api-to-query-variable-values-for-a/m-p/3551259#M7050</link>
    <description>&lt;P&gt;Based on the information shared in this blog:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.supernow-blog.com/blog/querying-related-tables.html" target="_blank"&gt;https://www.supernow-blog.com/blog/querying-related-tables.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to grab a specific variable value for a Request. What I have so far:&amp;nbsp;&lt;BR /&gt;URL: https://{{baseURL}}/api/now/v1/table/sc_item_option_mtom&lt;BR /&gt;For sysparm_query, I'm using:&amp;nbsp;&lt;BR /&gt;request_item=[Request's sys_id]&lt;BR /&gt;^JOINsc_item_option_mtom.sc_item_option=sc_item_option.sys_id&lt;BR /&gt;^JOINsc_item_option.item_option_new=item_option_new.sys_id!name=[name of variable]&lt;BR /&gt;For sysparm_fields:&amp;nbsp;&lt;BR /&gt;request_item,sc_item_option.sys_id,sc_item_option.value,sc_item_option.item_option_new.name,sc_item_option.item_option_new.reference&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;But it doesn't work if the last part, !name=[xxx] is included.&amp;nbsp;&lt;BR /&gt;Without specifying name, I will get a list of all variable/value for that Request. With name, I get 0 result.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;That syntax should be valid according to the blog (I keep the left table different for the two JOINs), and my own testing using a single JOIN.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;How can I make it work for two JOINs?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 30 May 2026 02:18:49 GMT</pubDate>
    <dc:creator>kcwong</dc:creator>
    <dc:date>2026-05-30T02:18:49Z</dc:date>
    <item>
      <title>Trying to use Table REST API to query variable values for a request</title>
      <link>https://www.servicenow.com/community/community-central-forum/trying-to-use-table-rest-api-to-query-variable-values-for-a/m-p/3551259#M7050</link>
      <description>&lt;P&gt;Based on the information shared in this blog:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.supernow-blog.com/blog/querying-related-tables.html" target="_blank"&gt;https://www.supernow-blog.com/blog/querying-related-tables.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to grab a specific variable value for a Request. What I have so far:&amp;nbsp;&lt;BR /&gt;URL: https://{{baseURL}}/api/now/v1/table/sc_item_option_mtom&lt;BR /&gt;For sysparm_query, I'm using:&amp;nbsp;&lt;BR /&gt;request_item=[Request's sys_id]&lt;BR /&gt;^JOINsc_item_option_mtom.sc_item_option=sc_item_option.sys_id&lt;BR /&gt;^JOINsc_item_option.item_option_new=item_option_new.sys_id!name=[name of variable]&lt;BR /&gt;For sysparm_fields:&amp;nbsp;&lt;BR /&gt;request_item,sc_item_option.sys_id,sc_item_option.value,sc_item_option.item_option_new.name,sc_item_option.item_option_new.reference&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;But it doesn't work if the last part, !name=[xxx] is included.&amp;nbsp;&lt;BR /&gt;Without specifying name, I will get a list of all variable/value for that Request. With name, I get 0 result.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;That syntax should be valid according to the blog (I keep the left table different for the two JOINs), and my own testing using a single JOIN.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;How can I make it work for two JOINs?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 May 2026 02:18:49 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/trying-to-use-table-rest-api-to-query-variable-values-for-a/m-p/3551259#M7050</guid>
      <dc:creator>kcwong</dc:creator>
      <dc:date>2026-05-30T02:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to use Table REST API to query variable values for a request</title>
      <link>https://www.servicenow.com/community/community-central-forum/trying-to-use-table-rest-api-to-query-variable-values-for-a/m-p/3551287#M7051</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/1036683"&gt;@kcwong&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Instead of this long query, you can create a database view and fetch the details from there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Navigate to &lt;STRONG&gt;System Definition -&amp;gt; Database Views -&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;STRONG&gt;New&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE width="804"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="64"&gt;Order&amp;nbsp;&lt;/TD&gt;&lt;TD width="168"&gt;Table Name&lt;/TD&gt;&lt;TD width="61"&gt;Variable Prefix&lt;/TD&gt;&lt;TD width="274"&gt;Where Clause&lt;/TD&gt;&lt;TD width="237"&gt;Purpose&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="64"&gt;100&lt;/TD&gt;&lt;TD width="168"&gt;Variable Ownership (sc_item_option_mtom)&lt;/TD&gt;&lt;TD width="61"&gt;mtom&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="237"&gt;Maps the specific variable value to its parent item.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="64"&gt;200&lt;/TD&gt;&lt;TD width="168"&gt;Options (sc_item_option)&lt;/TD&gt;&lt;TD width="61"&gt;opts&lt;/TD&gt;&lt;TD width="274"&gt;opts.sys_id = mtom.sc_item_option&lt;/TD&gt;&lt;TD width="237"&gt;Stores the individual variable values.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="64"&gt;300&lt;/TD&gt;&lt;TD width="168"&gt;Requested Item (sc_req_item)&lt;/TD&gt;&lt;TD width="61"&gt;ritm&lt;/TD&gt;&lt;TD width="274"&gt;ritm.sys_id = mtom.request_item&amp;nbsp;&lt;/TD&gt;&lt;TD width="237"&gt;References the main Requested Item (RITM) record.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Refer:&amp;nbsp;&lt;A class="" href="https://www.servicenow.com/community/in-other-news/two-ways-database-view-and-variable-config-to-create-catalog/ba-p/2943611" target="_blank" rel="noopener"&gt;Two ways (Database View and Variable config) to create Catalog Item variable report&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="" href="https://www.servicenow.com/community/servicenow-ai-platform-blog/report-on-item-variables-in-the-service-catalog-with-a-database/ba-p/2291713" target="_blank" rel="noopener"&gt;Report on Item Variables in the Service Catalog with a Database View&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="" href="https://www.servicenow.com/community/platform-analytics-articles/reporting-on-catalog-item-variables/ta-p/2298979" target="_blank" rel="noopener"&gt;Reporting on Catalog item variables&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 30 May 2026 07:14:54 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/trying-to-use-table-rest-api-to-query-variable-values-for-a/m-p/3551287#M7051</guid>
      <dc:creator>Tanushree Maiti</dc:creator>
      <dc:date>2026-05-30T07:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to use Table REST API to query variable values for a request</title>
      <link>https://www.servicenow.com/community/community-central-forum/trying-to-use-table-rest-api-to-query-variable-values-for-a/m-p/3551291#M7052</link>
      <description>&lt;P&gt;Can I query the created Database View with REST API? I need the Variable values via REST API, as I have a script for a lot of other stuff, the variables are only a tiny part of it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 May 2026 07:44:53 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/trying-to-use-table-rest-api-to-query-variable-values-for-a/m-p/3551291#M7052</guid>
      <dc:creator>kcwong</dc:creator>
      <dc:date>2026-05-30T07:44:53Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to use Table REST API to query variable values for a request</title>
      <link>https://www.servicenow.com/community/community-central-forum/trying-to-use-table-rest-api-to-query-variable-values-for-a/m-p/3551292#M7053</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/1036683"&gt;@kcwong&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Only Get operation will work on database view table. Which is your requirement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Refer this post for API :&amp;nbsp;&lt;A href="https://www.servicenow.com/community/developer-forum/using-database-view-in-rest-apis/m-p/2168944" target="_blank" rel="noopener"&gt;https://www.servicenow.com/community/developer-forum/using-database-view-in-rest-apis/m-p/2168944&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 May 2026 08:08:32 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/trying-to-use-table-rest-api-to-query-variable-values-for-a/m-p/3551292#M7053</guid>
      <dc:creator>Tanushree Maiti</dc:creator>
      <dc:date>2026-05-30T08:08:32Z</dc:date>
    </item>
  </channel>
</rss>

