<?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>topic selectContextMenuItem method returning &amp;quot;The method got an invalid argument&amp;quot; in Digital Exchange</title>
    <link>https://community.blueprism.com/t5/Digital-Exchange/selectContextMenuItem-method-returning-quot-The-method-got-an/m-p/49046#M14</link>
    <description>&lt;P&gt;I'm trying to sort a table in SAP in Blue Prism. The code previously worked fine but now I'm getting a 'The method got an invalid argument' error when I try to sort the table by context menu item. &lt;/P&gt;

&lt;P&gt;I've tried passing a variety of values to the selectContextMenuItem method: '&amp;amp;SORT_DSC', '&amp;amp;SORT_ASC', '&amp;amp;COL_INV'...all yield the same error.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Dim SAPGuiAuto as Object
Dim SAPApp as Object
Dim SAPCon as Object
Dim session as Object
Dim Table as Object

SAPGuiAuto = Microsoft.VisualBasic.Interaction.GetObject('SAPGUI')
SAPApp = SAPGuiAuto.GetScriptingEngine
SAPCon = SAPApp.Children(0)
session = SAPCon.Children(0)

Table = session.findById('/app/con[0]/ses[0]/wnd[0]/usr/cntlGRID1/shellcont/shell')
Table.setCurrentCell('-1', 'LMENGEIST')
Table.selectColumn('LMENGEIST')
Table.contextMenu
Table.selectContextMenuItem('&amp;amp;SORT_DSC')
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I expect the column I've selected to be sorted in descending order.&lt;/P&gt;

&lt;P&gt;Thanks in advance for any help you can provide.&lt;/P&gt;

--------------------------------------------------&lt;BR /&gt;

&lt;B&gt;Disclaimer:&lt;/B&gt; This content was auto-posted from Stackoverflow. The original Stackoverflow question is here &lt;A href="https://stackoverflow.com/questions/57822888/selectcontextmenuitem-method-returning-the-method-got-an-invalid-argument"&gt;Stackoverflow Post&lt;/A&gt;, posted by &lt;A href="https://stackoverflow.com/users/1186538/kevin"&gt;Kevin&lt;/A&gt;.</description>
    <pubDate>Fri, 06 Sep 2019 20:01:00 GMT</pubDate>
    <dc:creator>Digital_WorkerB</dc:creator>
    <dc:date>2019-09-06T20:01:00Z</dc:date>
    <item>
      <title>selectContextMenuItem method returning "The method got an invalid argument"</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/selectContextMenuItem-method-returning-quot-The-method-got-an/m-p/49046#M14</link>
      <description>&lt;P&gt;I'm trying to sort a table in SAP in Blue Prism. The code previously worked fine but now I'm getting a 'The method got an invalid argument' error when I try to sort the table by context menu item. &lt;/P&gt;

&lt;P&gt;I've tried passing a variety of values to the selectContextMenuItem method: '&amp;amp;SORT_DSC', '&amp;amp;SORT_ASC', '&amp;amp;COL_INV'...all yield the same error.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Dim SAPGuiAuto as Object
Dim SAPApp as Object
Dim SAPCon as Object
Dim session as Object
Dim Table as Object

SAPGuiAuto = Microsoft.VisualBasic.Interaction.GetObject('SAPGUI')
SAPApp = SAPGuiAuto.GetScriptingEngine
SAPCon = SAPApp.Children(0)
session = SAPCon.Children(0)

Table = session.findById('/app/con[0]/ses[0]/wnd[0]/usr/cntlGRID1/shellcont/shell')
Table.setCurrentCell('-1', 'LMENGEIST')
Table.selectColumn('LMENGEIST')
Table.contextMenu
Table.selectContextMenuItem('&amp;amp;SORT_DSC')
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I expect the column I've selected to be sorted in descending order.&lt;/P&gt;

&lt;P&gt;Thanks in advance for any help you can provide.&lt;/P&gt;

--------------------------------------------------&lt;BR /&gt;

&lt;B&gt;Disclaimer:&lt;/B&gt; This content was auto-posted from Stackoverflow. The original Stackoverflow question is here &lt;A href="https://stackoverflow.com/questions/57822888/selectcontextmenuitem-method-returning-the-method-got-an-invalid-argument"&gt;Stackoverflow Post&lt;/A&gt;, posted by &lt;A href="https://stackoverflow.com/users/1186538/kevin"&gt;Kevin&lt;/A&gt;.</description>
      <pubDate>Fri, 06 Sep 2019 20:01:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/selectContextMenuItem-method-returning-quot-The-method-got-an/m-p/49046#M14</guid>
      <dc:creator>Digital_WorkerB</dc:creator>
      <dc:date>2019-09-06T20:01:00Z</dc:date>
    </item>
  </channel>
</rss>

