<?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 Variable editor not showing in Service Portal ticket view for REQ's in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/variable-editor-not-showing-in-service-portal-ticket-view-for/m-p/1704115#M361041</link>
    <description>&lt;P&gt;I have cloned and made a very slight customisation, to remove the save button and make it read only, to the OOB sp-variable-editor widget.&amp;nbsp; I have added my cloned widget to the ticket page for end users to view a read only copy of their submitted form.&amp;nbsp; This is working perfectly fine for all forms being submitted except for REQ's whether catalog items or record producers on sc_request table.&amp;nbsp; When viewing the ticket page in the portal for any submitted REQ the variable editor widget does not display at all.&lt;/P&gt;
&lt;P&gt;Any advice on what I need to update in order for the variable editor to work on the sc_request table?&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 05 Dec 2020 03:59:14 GMT</pubDate>
    <dc:creator>Dedrei L_</dc:creator>
    <dc:date>2020-12-05T03:59:14Z</dc:date>
    <item>
      <title>Variable editor not showing in Service Portal ticket view for REQ's</title>
      <link>https://www.servicenow.com/community/developer-forum/variable-editor-not-showing-in-service-portal-ticket-view-for/m-p/1704115#M361041</link>
      <description>&lt;P&gt;I have cloned and made a very slight customisation, to remove the save button and make it read only, to the OOB sp-variable-editor widget.&amp;nbsp; I have added my cloned widget to the ticket page for end users to view a read only copy of their submitted form.&amp;nbsp; This is working perfectly fine for all forms being submitted except for REQ's whether catalog items or record producers on sc_request table.&amp;nbsp; When viewing the ticket page in the portal for any submitted REQ the variable editor widget does not display at all.&lt;/P&gt;
&lt;P&gt;Any advice on what I need to update in order for the variable editor to work on the sc_request table?&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 05 Dec 2020 03:59:14 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/variable-editor-not-showing-in-service-portal-ticket-view-for/m-p/1704115#M361041</guid>
      <dc:creator>Dedrei L_</dc:creator>
      <dc:date>2020-12-05T03:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: Variable editor not showing in Service Portal ticket view for REQ's</title>
      <link>https://www.servicenow.com/community/developer-forum/variable-editor-not-showing-in-service-portal-ticket-view-for/m-p/1704116#M361042</link>
      <description>&lt;P&gt;I think ootb variable editor available on sc_req_item table not on sc_request table.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is how it has designed, if you will check the server side script it has not applied for sc_request table, even you will define the formatter on sc_request table, it wont be able to fetch the value.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 05 Dec 2020 04:08:37 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/variable-editor-not-showing-in-service-portal-ticket-view-for/m-p/1704116#M361042</guid>
      <dc:creator>hvrdhn88</dc:creator>
      <dc:date>2020-12-05T04:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: Variable editor not showing in Service Portal ticket view for REQ's</title>
      <link>https://www.servicenow.com/community/developer-forum/variable-editor-not-showing-in-service-portal-ticket-view-for/m-p/1704117#M361043</link>
      <description>&lt;P&gt;Thanks for your response.&amp;nbsp; How does it work for all other tables then, including incident and other's that extend task but just not for sc_request?&lt;/P&gt;</description>
      <pubDate>Sat, 05 Dec 2020 04:41:46 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/variable-editor-not-showing-in-service-portal-ticket-view-for/m-p/1704117#M361043</guid>
      <dc:creator>Dedrei L_</dc:creator>
      <dc:date>2020-12-05T04:41:46Z</dc:date>
    </item>
    <item>
      <title>Re: Variable editor not showing in Service Portal ticket view for REQ's</title>
      <link>https://www.servicenow.com/community/developer-forum/variable-editor-not-showing-in-service-portal-ticket-view-for/m-p/1704118#M361044</link>
      <description>&lt;P&gt;Technical justification.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="find_real_file.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/200039i6AD81052A6396F60/image-size/large?v=v2&amp;amp;px=999" role="button" title="find_real_file.png" alt="find_real_file.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;GlideappVariablePoolQuestionSet() : when you will run this function and pass the request sys_id in&amp;nbsp;set.setRequestID() then it will not be able to fetch the variables because when you submit the catalog form using "order now" and workflow associated with ritm or request, it link the variables on ritm end .&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now giving you another example for&amp;nbsp;GlideappSequencedQuestionSet() , example you have a record producer on incident table then this will give you the variable details&lt;/P&gt;
&lt;P&gt;or if you have record producer on sc_request table then this scenario it will show the record.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Script which you can run at your end using background script to test the result.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class="language-markup"&gt;&lt;CODE&gt;var gr = new GlideRecord('task');
gr.get('1e70eacf2f34a8d0f68d5ff62799b687'); // Add your sys_id of record

// Catalog Form 
var set = new GlideappVariablePoolQuestionSet();
set.setRequestID(gr.sys_id);
set.load();
var vs = set.getFlatQuestions();
for (var i = 0; i &amp;lt; vs.size(); i++) {
if (vs.get(i).getDisplayValue() != '' &amp;amp;&amp;amp; +vs.get(i).getLabel() != '') {

gs.print("Catalog form "+ '&amp;lt;b&amp;gt;' +vs.get(i).getLabel() + " = " + '&amp;lt;/b&amp;gt;' + vs.get(i).getDisplayValue() + "\n");

}
}

// Record Producer 
var set = new GlideappSequencedQuestionSet();
set.setTableName('sc_request');
set.setTableSysID(gr.sys_id);
set.load();
var vs = set.getFlatQuestions();
for (var i=0; i &amp;lt; vs.size(); i++) {
gs.print('Record Producer +   vs.get(i).getLabel() + " = "+ vs.get(i).getDisplayValue() + "&amp;lt;br /&amp;gt;");

}               
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Test result. I have considered both scenario ( created request using catalog form as well as Record Producer.)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="find_real_file.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/200045i98E8A1CBD049366B/image-size/large?v=v2&amp;amp;px=999" role="button" title="find_real_file.png" alt="find_real_file.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 05 Dec 2020 06:03:11 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/variable-editor-not-showing-in-service-portal-ticket-view-for/m-p/1704118#M361044</guid>
      <dc:creator>hvrdhn88</dc:creator>
      <dc:date>2020-12-05T06:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: Variable editor not showing in Service Portal ticket view for REQ's</title>
      <link>https://www.servicenow.com/community/developer-forum/variable-editor-not-showing-in-service-portal-ticket-view-for/m-p/1704119#M361045</link>
      <description>&lt;P&gt;Thank you so much for all the trouble you went through to help me.&amp;nbsp; I will have a closer look, use your script and test a few things on Monday and let you know how I go.&amp;nbsp; At the moment my record producers on sc_request table are not showing the variable editor in the portal, but all other record producers are.&lt;/P&gt;</description>
      <pubDate>Sat, 05 Dec 2020 06:48:02 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/variable-editor-not-showing-in-service-portal-ticket-view-for/m-p/1704119#M361045</guid>
      <dc:creator>Dedrei L_</dc:creator>
      <dc:date>2020-12-05T06:48:02Z</dc:date>
    </item>
    <item>
      <title>Re: Variable editor not showing in Service Portal ticket view for REQ's</title>
      <link>https://www.servicenow.com/community/developer-forum/variable-editor-not-showing-in-service-portal-ticket-view-for/m-p/1704120#M361046</link>
      <description>&lt;P&gt;for that you have to build formatter on sc_request table then it will be visible for record producer.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://hi.service-now.com/kb_view.do?sysparm_article=KB0538897"&gt;https://hi.service-now.com/kb_view.do?sysparm_article=KB0538897&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://hi.service-now.com/kb_view.do?sysparm_article=KB0725077"&gt;https://hi.service-now.com/kb_view.do?sysparm_article=KB0725077&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 05 Dec 2020 07:25:34 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/variable-editor-not-showing-in-service-portal-ticket-view-for/m-p/1704120#M361046</guid>
      <dc:creator>hvrdhn88</dc:creator>
      <dc:date>2020-12-05T07:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: Variable editor not showing in Service Portal ticket view for REQ's</title>
      <link>https://www.servicenow.com/community/developer-forum/variable-editor-not-showing-in-service-portal-ticket-view-for/m-p/1704121#M361047</link>
      <description>&lt;P&gt;Any update on this thread?&lt;/P&gt;
&lt;P&gt;Let me know if you need any further help here.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your query has solved, kindly mark the answer correct and close this thread.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 21:39:53 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/variable-editor-not-showing-in-service-portal-ticket-view-for/m-p/1704121#M361047</guid>
      <dc:creator>hvrdhn88</dc:creator>
      <dc:date>2020-12-08T21:39:53Z</dc:date>
    </item>
    <item>
      <title>Re: Variable editor not showing in Service Portal ticket view for REQ's</title>
      <link>https://www.servicenow.com/community/developer-forum/variable-editor-not-showing-in-service-portal-ticket-view-for/m-p/1704122#M361048</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;No I haven't really made any progress yet.&amp;nbsp; I understand that when submitting a catelog item the variables will not show in the portal when viewing the main REQ. But I still can't get it to show the variables for record producers on sc_request table.&lt;/P&gt;
&lt;P&gt;I have tested by adding and removing the variable formatter on the sc_request form. Reason for testing with both is because the variable editor shows for incidents on the portal and our incident form does not have a custom formatter added, and similar with other custom tables where the variable editor shows on the portal even though not added to the table form.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't get the same results as demonstrated in your video.&lt;/P&gt;
&lt;P&gt;I also checked that the correct widget is being used as per the KB.&amp;nbsp; It was set on the OOTB one I then tried switching it to my custom one too with no luck and then switched it back to the OOTB one.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2020 00:47:02 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/variable-editor-not-showing-in-service-portal-ticket-view-for/m-p/1704122#M361048</guid>
      <dc:creator>Dedrei L_</dc:creator>
      <dc:date>2020-12-09T00:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: Variable editor not showing in Service Portal ticket view for REQ's</title>
      <link>https://www.servicenow.com/community/developer-forum/variable-editor-not-showing-in-service-portal-ticket-view-for/m-p/1704123#M361049</link>
      <description>&lt;P&gt;Also when I run the background test script on a sc_request record producer I get the desired output. So the values are being stored in the Question Answer table.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2020 01:06:49 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/variable-editor-not-showing-in-service-portal-ticket-view-for/m-p/1704123#M361049</guid>
      <dc:creator>Dedrei L_</dc:creator>
      <dc:date>2020-12-09T01:06:49Z</dc:date>
    </item>
    <item>
      <title>Re: Variable editor not showing in Service Portal ticket view for REQ's</title>
      <link>https://www.servicenow.com/community/developer-forum/variable-editor-not-showing-in-service-portal-ticket-view-for/m-p/1704124#M361050</link>
      <description>&lt;P&gt;Another test that I tried, was reverting back to the OOTB sp-variable-editor widget on the portal page to make sure I didn't accidentally customise something that broke it for sc_request.&amp;nbsp; But even when reverting back to the OOTB widget it still doesn't display for record producers on sc_request.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2020 01:10:09 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/variable-editor-not-showing-in-service-portal-ticket-view-for/m-p/1704124#M361050</guid>
      <dc:creator>Dedrei L_</dc:creator>
      <dc:date>2020-12-09T01:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: Variable editor not showing in Service Portal ticket view for REQ's</title>
      <link>https://www.servicenow.com/community/developer-forum/variable-editor-not-showing-in-service-portal-ticket-view-for/m-p/1704125#M361051</link>
      <description>&lt;P&gt;are you doing it on personal instance or if possible share screen over webex or zoom call ? this way I can quickly try to troubleshoot it.&amp;nbsp; please connect me at&amp;nbsp; hvrdhn88@gmail.com&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2020 12:12:55 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/variable-editor-not-showing-in-service-portal-ticket-view-for/m-p/1704125#M361051</guid>
      <dc:creator>hvrdhn88</dc:creator>
      <dc:date>2020-12-09T12:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: Variable editor not showing in Service Portal ticket view for REQ's</title>
      <link>https://www.servicenow.com/community/developer-forum/variable-editor-not-showing-in-service-portal-ticket-view-for/m-p/1704126#M361052</link>
      <description>&lt;P&gt;This has now been resolved.&amp;nbsp; All form (SC Catalog Item) pages redirect to the ticket page where I added the variable editor, however if it's an sc_request it redirects to the request page, on which I did not add the variable editor.&amp;nbsp; I was unaware of the redirection for sc_request.&amp;nbsp; Added the variable editor to the request page and everything is working as expected now.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 22:47:44 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/variable-editor-not-showing-in-service-portal-ticket-view-for/m-p/1704126#M361052</guid>
      <dc:creator>Dedrei L_</dc:creator>
      <dc:date>2020-12-14T22:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: Variable editor not showing in Service Portal ticket view for REQ's</title>
      <link>https://www.servicenow.com/community/developer-forum/variable-editor-not-showing-in-service-portal-ticket-view-for/m-p/1704127#M361053</link>
      <description>&lt;P&gt;Thanks for all your time and effort in trying to help me with this, I really appreciate it.&amp;nbsp; I have resolved the issue, details are in the post below.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 22:48:56 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/variable-editor-not-showing-in-service-portal-ticket-view-for/m-p/1704127#M361053</guid>
      <dc:creator>Dedrei L_</dc:creator>
      <dc:date>2020-12-14T22:48:56Z</dc:date>
    </item>
  </channel>
</rss>

