<?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 Re: How do you determine who approved or rejected a Flow Designer 'Ask For Approval' action? in ServiceNow AI Platform forum</title>
    <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/how-do-you-determine-who-approved-or-rejected-a-flow-designer/m-p/2705553#M191776</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/311659"&gt;@terryreints&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue is just related to auto&amp;nbsp;&lt;SPAN&gt;completion/suggestions scripts.&lt;/SPAN&gt;&amp;nbsp;If you write the correct syntax it should work anyway.&lt;/P&gt;&lt;P&gt;Let's try the below approach as well. We don't need to wait.&lt;/P&gt;&lt;P&gt;1. Create new Flow Action. Define the &lt;STRONG&gt;Input&lt;/STRONG&gt; and Add the &lt;STRONG&gt;Script step&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TaiVu_1-1697596466880.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/298094iA33308526A6C9F1C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TaiVu_1-1697596466880.png" alt="TaiVu_1-1697596466880.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Define the Input Variables and put the function into the Script box.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TaiVu_2-1697596568750.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/298096i5C9A0188667BB7B3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TaiVu_2-1697596568750.png" alt="TaiVu_2-1697596568750.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Also remember to define the output for the function&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TaiVu_3-1697596610592.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/298098i329717060486DA4D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TaiVu_3-1697596610592.png" alt="TaiVu_3-1697596610592.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. Lastly, define Action Output and drop the Approver output from the function into it.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TaiVu_4-1697596706294.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/298101i10817140932149AC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TaiVu_4-1697596706294.png" alt="TaiVu_4-1697596706294.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can also create your own flow action with configuration only by using &lt;STRONG&gt;Look Up Record&lt;/STRONG&gt;&amp;nbsp; step instead of &lt;STRONG&gt;Script&lt;/STRONG&gt; step.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if it works for you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Tai Vu&lt;/P&gt;</description>
    <pubDate>Wed, 18 Oct 2023 02:42:41 GMT</pubDate>
    <dc:creator>Tai Vu</dc:creator>
    <dc:date>2023-10-18T02:42:41Z</dc:date>
    <item>
      <title>How do you determine who approved or rejected a Flow Designer 'Ask For Approval' action?</title>
      <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/how-do-you-determine-who-approved-or-rejected-a-flow-designer/m-p/2700743#M191687</link>
      <description />
      <pubDate>Thu, 12 Oct 2023 21:32:04 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-ai-platform-forum/how-do-you-determine-who-approved-or-rejected-a-flow-designer/m-p/2700743#M191687</guid>
      <dc:creator>terryreints</dc:creator>
      <dc:date>2023-10-12T21:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do you determine who approved or rejected a Flow Designer 'Ask For Approval' action?</title>
      <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/how-do-you-determine-who-approved-or-rejected-a-flow-designer/m-p/2700923#M191691</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/311659"&gt;@terryreints&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;You can find all the records in "sysapproval_approver" table.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2023 04:32:56 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-ai-platform-forum/how-do-you-determine-who-approved-or-rejected-a-flow-designer/m-p/2700923#M191691</guid>
      <dc:creator>Community Alums</dc:creator>
      <dc:date>2023-10-13T04:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do you determine who approved or rejected a Flow Designer 'Ask For Approval' action?</title>
      <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/how-do-you-determine-who-approved-or-rejected-a-flow-designer/m-p/2700927#M191692</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/311659"&gt;@terryreints&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use the action &lt;STRONG&gt;Look Up&lt;/STRONG&gt; to the table "Approvals [sysapproval_approver]" after the&lt;STRONG&gt; Ask for approval&lt;/STRONG&gt; action.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or you can try the below script on where you need the information of the Approver.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var recordID = fd_data.trigger.current.sys_id.toString(); //Replace your record id in the flow
var grApprover = new GlideRecord('sysapproval_approver');
grApprover.addQuery('document_id', recordID);
grApprover.addQuery('state', 'approved').addOrCondition('state', 'rejected');
grApprover.query();
if(grApprover.next()){
    return grApprover.getValue('approver');
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if it works for you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Tai Vu&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2023 04:43:28 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-ai-platform-forum/how-do-you-determine-who-approved-or-rejected-a-flow-designer/m-p/2700927#M191692</guid>
      <dc:creator>Tai Vu</dc:creator>
      <dc:date>2023-10-13T04:43:28Z</dc:date>
    </item>
    <item>
      <title>Re: How do you determine who approved or rejected a Flow Designer 'Ask For Approval' action?</title>
      <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/how-do-you-determine-who-approved-or-rejected-a-flow-designer/m-p/2701851#M191714</link>
      <description>&lt;P&gt;Tai,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What should I use for the sys_id? Is it the sc_task record?&lt;/P&gt;&lt;P&gt;I'm not sure how to script this to get the sys_id. Could you provide a script for that?&lt;/P&gt;&lt;P&gt;My goal is to update the RITM's comment stream in action #44 below to&amp;nbsp;show who processed the approval.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Terry&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="terryreints_0-1697211281801.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/297245iD712CB714C4E2D27/image-size/medium?v=v2&amp;amp;px=400" role="button" title="terryreints_0-1697211281801.png" alt="terryreints_0-1697211281801.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2023 15:40:41 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-ai-platform-forum/how-do-you-determine-who-approved-or-rejected-a-flow-designer/m-p/2701851#M191714</guid>
      <dc:creator>terryreints</dc:creator>
      <dc:date>2023-10-13T15:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: How do you determine who approved or rejected a Flow Designer 'Ask For Approval' action?</title>
      <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/how-do-you-determine-who-approved-or-rejected-a-flow-designer/m-p/2702735#M191726</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/311659"&gt;@terryreints&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;The sys_id is the record that you put into the step &lt;STRONG&gt;Ask for approval.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TaiVu_0-1697424125829.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/297467i27874F3B8BB86894/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TaiVu_0-1697424125829.png" alt="TaiVu_0-1697424125829.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Because your case is&amp;nbsp;&lt;SPAN&gt;to update the RITM's comment. So the script should be located also in this step.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TaiVu_1-1697424188778.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/297468i01434A2F02FBAA2B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TaiVu_1-1697424188778.png" alt="TaiVu_1-1697424188778.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We need to replace the part after &lt;STRONG&gt;fd_data&amp;nbsp;&lt;/STRONG&gt;from the script to the record sys_id that we get approvals.&lt;/P&gt;&lt;P&gt;Ex: if you're requesting for approval from a Catalog task (37), it will be something like &lt;STRONG&gt;"&lt;SPAN&gt;fd_data._37__create_record.record.sys_id.toString()&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;/*
**Access Flow/Action data using the fd_data object. Script must return a value. 
**Order number is offset by +1 in Error Handling Section.
**Available options display upon pressing "." after fd_data
**example: var shortDesc = fd_data.trigger.current.short_description;
**return shortDesc;
*/
var recordID = fd_data.&amp;lt;the_step_to_get_record_sys_id&amp;gt;.sys_id.toString(); //Replace your record id in the flow
var grApprover = new GlideRecord('sysapproval_approver');
grApprover.addQuery('document_id', recordID);
grApprover.addQuery('state', 'approved').addOrCondition('state', 'rejected');
grApprover.query();
if(grApprover.next()){
    return grApprover.getValue('approver');
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can also refer to the below docs for more detail about scripting in flow designer.&lt;/P&gt;&lt;H1&gt;&lt;A title="Inline scripts" href="https://docs.servicenow.com/en-US/bundle/vancouver-build-workflows/page/administer/flow-designer/concept/inline-scripts.html" target="_self"&gt;Inline scripts&lt;/A&gt;&lt;/H1&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Tai Vu&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 02:50:24 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-ai-platform-forum/how-do-you-determine-who-approved-or-rejected-a-flow-designer/m-p/2702735#M191726</guid>
      <dc:creator>Tai Vu</dc:creator>
      <dc:date>2023-10-16T02:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do you determine who approved or rejected a Flow Designer 'Ask For Approval' action?</title>
      <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/how-do-you-determine-who-approved-or-rejected-a-flow-designer/m-p/2705401#M191772</link>
      <description>&lt;P&gt;Tai,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That is very helpful! Thank you.&lt;/P&gt;&lt;P&gt;Unfortunately, we are on Utah Patch 7 and the Flow Designer script editor's fd_data dot walking is broken. I was told by support, "...this issue (PRB1696950) and unfortunately there are no workarounds at this time. The good news is that it is fixed in our next patch for Utah (patch &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; and Vancouver (patch 3) available after 10/26."&lt;/P&gt;&lt;P&gt;I will upgrade and try your solution soon after that.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Terry&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2023 20:56:50 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-ai-platform-forum/how-do-you-determine-who-approved-or-rejected-a-flow-designer/m-p/2705401#M191772</guid>
      <dc:creator>terryreints</dc:creator>
      <dc:date>2023-10-17T20:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: How do you determine who approved or rejected a Flow Designer 'Ask For Approval' action?</title>
      <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/how-do-you-determine-who-approved-or-rejected-a-flow-designer/m-p/2705553#M191776</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/311659"&gt;@terryreints&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue is just related to auto&amp;nbsp;&lt;SPAN&gt;completion/suggestions scripts.&lt;/SPAN&gt;&amp;nbsp;If you write the correct syntax it should work anyway.&lt;/P&gt;&lt;P&gt;Let's try the below approach as well. We don't need to wait.&lt;/P&gt;&lt;P&gt;1. Create new Flow Action. Define the &lt;STRONG&gt;Input&lt;/STRONG&gt; and Add the &lt;STRONG&gt;Script step&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TaiVu_1-1697596466880.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/298094iA33308526A6C9F1C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TaiVu_1-1697596466880.png" alt="TaiVu_1-1697596466880.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Define the Input Variables and put the function into the Script box.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TaiVu_2-1697596568750.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/298096i5C9A0188667BB7B3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TaiVu_2-1697596568750.png" alt="TaiVu_2-1697596568750.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Also remember to define the output for the function&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TaiVu_3-1697596610592.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/298098i329717060486DA4D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TaiVu_3-1697596610592.png" alt="TaiVu_3-1697596610592.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. Lastly, define Action Output and drop the Approver output from the function into it.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TaiVu_4-1697596706294.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/298101i10817140932149AC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TaiVu_4-1697596706294.png" alt="TaiVu_4-1697596706294.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can also create your own flow action with configuration only by using &lt;STRONG&gt;Look Up Record&lt;/STRONG&gt;&amp;nbsp; step instead of &lt;STRONG&gt;Script&lt;/STRONG&gt; step.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if it works for you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Tai Vu&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2023 02:42:41 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-ai-platform-forum/how-do-you-determine-who-approved-or-rejected-a-flow-designer/m-p/2705553#M191776</guid>
      <dc:creator>Tai Vu</dc:creator>
      <dc:date>2023-10-18T02:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: How do you determine who approved or rejected a Flow Designer 'Ask For Approval' action?</title>
      <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/how-do-you-determine-who-approved-or-rejected-a-flow-designer/m-p/2709441#M191853</link>
      <description>&lt;P&gt;Tai,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your solution is exactly what I needed.&lt;/P&gt;&lt;P&gt;Thank you so much!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Terry&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2023 21:21:06 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-ai-platform-forum/how-do-you-determine-who-approved-or-rejected-a-flow-designer/m-p/2709441#M191853</guid>
      <dc:creator>terryreints</dc:creator>
      <dc:date>2023-10-20T21:21:06Z</dc:date>
    </item>
  </channel>
</rss>

