<?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 How to set value in workflow  in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474722#M131648</link>
    <description>&lt;P&gt;Can some one help me with this script&lt;/P&gt;
&lt;P&gt;I have a table u_test_results&amp;nbsp; in which there is a record XYZ1 ( with name as u_name)&lt;/P&gt;
&lt;P&gt;I have a catalog item on which we have a variable which is reference field of above table , when a user picks the above record and place a request we need to set a current time on other table&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in the workflow i am writing this script and its not setting the time . Can you please help me fixing this issue .&lt;/P&gt;
&lt;P&gt;The other table is u_solution which has 2 fields&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1 closed date and 2.record for (this field contains XYZ record and its a reference field too)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;var GOT= parseInt(current.variables.u_name.getDisplayValue());&lt;BR /&gt; var gr = new GlideRecord('u_solution&amp;nbsp;');&lt;BR /&gt; gr.addQuery(u_recorded_for, GOT);&lt;BR /&gt; gr.query();&lt;BR /&gt; &lt;BR /&gt; if (gr.next()) {&lt;BR /&gt; gr.u_closed_date = current.opened_at;&lt;BR /&gt; gr.update();&lt;BR /&gt; }&lt;/P&gt;</description>
    <pubDate>Tue, 04 Jun 2019 19:49:41 GMT</pubDate>
    <dc:creator>RudhraKAM</dc:creator>
    <dc:date>2019-06-04T19:49:41Z</dc:date>
    <item>
      <title>How to set value in workflow</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474722#M131648</link>
      <description>&lt;P&gt;Can some one help me with this script&lt;/P&gt;
&lt;P&gt;I have a table u_test_results&amp;nbsp; in which there is a record XYZ1 ( with name as u_name)&lt;/P&gt;
&lt;P&gt;I have a catalog item on which we have a variable which is reference field of above table , when a user picks the above record and place a request we need to set a current time on other table&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in the workflow i am writing this script and its not setting the time . Can you please help me fixing this issue .&lt;/P&gt;
&lt;P&gt;The other table is u_solution which has 2 fields&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1 closed date and 2.record for (this field contains XYZ record and its a reference field too)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;var GOT= parseInt(current.variables.u_name.getDisplayValue());&lt;BR /&gt; var gr = new GlideRecord('u_solution&amp;nbsp;');&lt;BR /&gt; gr.addQuery(u_recorded_for, GOT);&lt;BR /&gt; gr.query();&lt;BR /&gt; &lt;BR /&gt; if (gr.next()) {&lt;BR /&gt; gr.u_closed_date = current.opened_at;&lt;BR /&gt; gr.update();&lt;BR /&gt; }&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2019 19:49:41 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474722#M131648</guid>
      <dc:creator>RudhraKAM</dc:creator>
      <dc:date>2019-06-04T19:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to set value in workflow</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474723#M131649</link>
      <description>&lt;P&gt;try&lt;/P&gt;
&lt;PRE class="language-javascript"&gt;&lt;CODE&gt;var GOT= parseInt(current.variables.u_name.getDisplayValue());
var gr = new GlideRecord('u_solution');
gr.addQuery('u_recorded_for', GOT);
gr.query();
if (gr.next()) {
	gr.u_closed_date = current.opened_at;
	gr.u_recorded_for = current.sys_id;
	gr.update();
}&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 Jun 2019 19:52:52 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474723#M131649</guid>
      <dc:creator>Mike Patel</dc:creator>
      <dc:date>2019-06-04T19:52:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to set value in workflow</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474724#M131650</link>
      <description>&lt;P&gt;Thanks Mike ,, the end date didnt populated ( its not working )&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2019 20:20:21 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474724#M131650</guid>
      <dc:creator>RudhraKAM</dc:creator>
      <dc:date>2019-06-04T20:20:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to set value in workflow</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474725#M131651</link>
      <description>&lt;P&gt;Did it update below field ?&lt;/P&gt;
&lt;PRE class="language-javascript"&gt;&lt;CODE&gt;u_recorded_for &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 Jun 2019 20:27:18 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474725#M131651</guid>
      <dc:creator>Mike Patel</dc:creator>
      <dc:date>2019-06-04T20:27:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to set value in workflow</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474726#M131652</link>
      <description>&lt;P&gt;//var GOT= parseInt(current.variables.u_name.getDisplayValue()); &lt;STRONG&gt;//Why this line??&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;var GOT= current.variables.u_name;&amp;nbsp;&lt;BR /&gt;var gr = new GlideRecord('u_solution&amp;nbsp;');&lt;BR /&gt;gr.addQuery('u_recorded_for', GOT);&lt;BR /&gt;gr.query();&lt;BR /&gt;&lt;BR /&gt;if (gr.next()) {&lt;BR /&gt;gr.u_closed_date = current.opened_at;&lt;BR /&gt;gr.update();&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2019 20:28:18 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474726#M131652</guid>
      <dc:creator>Prateek kumar</dc:creator>
      <dc:date>2019-06-04T20:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to set value in workflow</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474727#M131653</link>
      <description>&lt;P&gt;Thanks Prateek , The code didnt work &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 13:32:01 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474727#M131653</guid>
      <dc:creator>RudhraKAM</dc:creator>
      <dc:date>2019-06-05T13:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to set value in workflow</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474728#M131654</link>
      <description>&lt;P&gt;yes that is same as&amp;nbsp; u_name&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 13:33:17 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474728#M131654</guid>
      <dc:creator>RudhraKAM</dc:creator>
      <dc:date>2019-06-05T13:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to set value in workflow</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474729#M131655</link>
      <description>&lt;P&gt;try&lt;/P&gt;
&lt;PRE class="language-javascript"&gt;&lt;CODE&gt;var GOT= current.variables.u_name.getDisplayValue();
var gr = new GlideRecord('u_solution');
gr.addQuery('u_recorded_for', GOT);
gr.query();
if (gr.next()) {
	gr.u_closed_date = current.opened_at;
	gr.u_recorded_for = current.sys_id;
	gr.update();
}&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Jun 2019 13:38:24 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474729#M131655</guid>
      <dc:creator>Mike Patel</dc:creator>
      <dc:date>2019-06-05T13:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to set value in workflow</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474730#M131656</link>
      <description>&lt;PRE class="language-javascript"&gt;&lt;CODE&gt;var GOT= current.variables.u_name.getDisplayValue();
gs.log('The Value is'+GOT);
var gr = new GlideRecord('u_solution');
gr.addQuery('u_recorded_for',GOT);
gr.query();
gs.log('Row Count'+gr.getRowCount());
if (gr.next()) {
	gr.u_closed_date = current.opened_at;
	gr.u_recorded_for = current.sys_id;
	gr.update();
}&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;try now and let me know the log details.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 13:38:58 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474730#M131656</guid>
      <dc:creator>hvrdhn88</dc:creator>
      <dc:date>2019-06-05T13:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to set value in workflow</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474731#M131657</link>
      <description>&lt;P&gt;Thanks Harsh&amp;nbsp;&lt;/P&gt;
&lt;P&gt;its showing some error message in workflow activity ( u_recorded_for is not defined&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;logs returning the name and rowcount&amp;nbsp; returns some sys_id&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I double check the name in the table it is correct&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 15:27:35 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474731#M131657</guid>
      <dc:creator>RudhraKAM</dc:creator>
      <dc:date>2019-06-05T15:27:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to set value in workflow</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474732#M131658</link>
      <description>&lt;P&gt;its showing run script error&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;stating that&amp;nbsp; u_recorded_for is not defined&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 15:32:11 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474732#M131658</guid>
      <dc:creator>RudhraKAM</dc:creator>
      <dc:date>2019-06-05T15:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to set value in workflow</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474733#M131659</link>
      <description>&lt;P&gt;"u_recorded_for" it is on which table ?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;can you put the screenshot here of workflow and the field&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 15:38:05 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474733#M131659</guid>
      <dc:creator>hvrdhn88</dc:creator>
      <dc:date>2019-06-05T15:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to set value in workflow</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474734#M131660</link>
      <description>&lt;P&gt;U_recorded_for is on u_solution tables which is reference of cmdb_ci&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class="language-javascript"&gt;&lt;CODE&gt;current.variables.u_name.getDisplayValue();&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;is a reference of u_delegate table both the records have same sys_id&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 17:17:21 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474734#M131660</guid>
      <dc:creator>RudhraKAM</dc:creator>
      <dc:date>2019-06-05T17:17:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to set value in workflow</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474735#M131661</link>
      <description>&lt;P&gt;Hello Harsh&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please see this post this is similar to existiing issue&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.servicenow.com/community?id=community_question&amp;amp;sys_id=01865a6edb35bb80d58ea345ca96197a" rel="nofollow"&gt;https://community.servicenow.com/community?id=community_question&amp;amp;sys_id=01865a6edb35bb80d58ea345ca96197a&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2019 13:14:31 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474735#M131661</guid>
      <dc:creator>RudhraKAM</dc:creator>
      <dc:date>2019-06-06T13:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to set value in workflow</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474736#M131662</link>
      <description>&lt;P&gt;is it possible , if you can connect me on webex and share your screen, this way i can quickly try to help you .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2019 14:31:16 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474736#M131662</guid>
      <dc:creator>hvrdhn88</dc:creator>
      <dc:date>2019-06-06T14:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to set value in workflow</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474737#M131663</link>
      <description>&lt;P&gt;sure&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2019 14:45:11 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474737#M131663</guid>
      <dc:creator>RudhraKAM</dc:creator>
      <dc:date>2019-06-06T14:45:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to set value in workflow</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474738#M131664</link>
      <description>&lt;P&gt;https://us04web.zoom.us/j/6889975608&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2019 14:51:05 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474738#M131664</guid>
      <dc:creator>RudhraKAM</dc:creator>
      <dc:date>2019-06-06T14:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to set value in workflow</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474739#M131665</link>
      <description>&lt;P&gt;joining ..&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2019 14:55:37 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474739#M131665</guid>
      <dc:creator>hvrdhn88</dc:creator>
      <dc:date>2019-06-06T14:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to set value in workflow</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474740#M131666</link>
      <description>&lt;P&gt;Hi harsh are you joining ?&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2019 15:10:14 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474740#M131666</guid>
      <dc:creator>RudhraKAM</dc:creator>
      <dc:date>2019-06-06T15:10:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to set value in workflow</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474741#M131667</link>
      <description>&lt;P&gt;i tried to connect you and seems like you are on another zoom meeting.&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/164582i6FC9A39BC9CC6DF8/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>Thu, 06 Jun 2019 15:10:19 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-set-value-in-workflow/m-p/1474741#M131667</guid>
      <dc:creator>hvrdhn88</dc:creator>
      <dc:date>2019-06-06T15:10:19Z</dc:date>
    </item>
  </channel>
</rss>

