<?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 Re: Translation script with Manual Optionlist in HPE Morpheus Enterprise</title>
    <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/translation-script-with-manual-optionlist/m-p/7249508#M2682</link>
    <description>&lt;P&gt;Quick question.  Are you on the 6.1.x branch of Morpheus or plan on upgrading to the 6.2.0 branch next month?   We will be introducing a VMware folder select list within the form build to make this more native.&lt;/P&gt;</description>
    <pubDate>Thu, 22 Jun 2023 16:12:55 GMT</pubDate>
    <dc:creator>cbunge</dc:creator>
    <dc:date>2023-06-22T16:12:55Z</dc:date>
    <item>
      <title>Translation script with Manual Optionlist</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/translation-script-with-manual-optionlist/m-p/7249499#M2673</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I’m trying create an option list which contains a list of ids for vmwareFolderId&lt;/P&gt;
&lt;P&gt;Currently we have 5 vcentres which contain the same VMware Folder, but the ID is different.&lt;/P&gt;
&lt;P&gt;Ideally I would like to add some logic so depending on what cloud has been selected then the required Vmware folder is chosen.&lt;/P&gt;
&lt;P&gt;Apart from allowing an input for the end user to select from a list, I have not managed to get it work.&lt;/P&gt;
&lt;P&gt;I don’t think setting VMware folders via the Morpheus GUI for each tenant is right, I have also tried to create individual inputs with the same fieldname, hidden it and set a default value, adding the custom options entry to config but get this error:&lt;/P&gt;
&lt;P&gt;failed to create server: class java.util.ArrayList cannot be cast to class java.lang.String (java.util.ArrayList and java.lang.String are in module java.base of loader ‘bootstrap’)&lt;/P&gt;
&lt;P&gt;I have tried to create an if statement ie if selectedcloud = devvcentre 1 push results and devcentre 2 push x results. But my if statement logic is not correct, and it just lists both items regardless of what cloud I have selected.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/149780i14B9C1F95856C436/image-size/large?v=v2&amp;amp;px=2000" role="button" title="e3d37aa29130efba682af3045d0e9db9acae9817.png" alt="e3d37aa29130efba682af3045d0e9db9acae9817.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Any help appreciated?&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2023 09:39:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/translation-script-with-manual-optionlist/m-p/7249499#M2673</guid>
      <dc:creator />
      <dc:date>2023-06-21T09:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: Translation script with Manual Optionlist</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/translation-script-with-manual-optionlist/m-p/7249500#M2674</link>
      <description>&lt;P&gt;I have added input, however I don’t think the IF statement is correct as both are shown instead of one:&lt;/P&gt;
&lt;P&gt;if (input.selectedCloud = (‘Devcenter1’))&lt;BR /&gt;
{&lt;BR /&gt;
results.push({name:data[0].name, value:data[0].value});&lt;BR /&gt;
}&lt;BR /&gt;
if (input.selectedCloud = (‘Devcenter2’))&lt;BR /&gt;
{&lt;BR /&gt;
results.push({name:data[1].name, value:data[1].value});&lt;BR /&gt;
}&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/149768i21C92C17D3FEC1E9/image-size/large?v=v2&amp;amp;px=2000" role="button" title="d9168113375350ca95d8d066d990807592e7bfc3.png" alt="d9168113375350ca95d8d066d990807592e7bfc3.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2023 07:51:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/translation-script-with-manual-optionlist/m-p/7249500#M2674</guid>
      <dc:creator />
      <dc:date>2023-06-22T07:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: Translation script with Manual Optionlist</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/translation-script-with-manual-optionlist/m-p/7249501#M2675</link>
      <description>&lt;P&gt;Hi Chopper,&lt;BR /&gt;
Please try replacing the if condition statement with == operator .&lt;BR /&gt;
if (input.selectedCloud == (‘Devcenter1’))&lt;BR /&gt;
{&lt;BR /&gt;
results.push({name:data[0].name, value:data[0].value});&lt;BR /&gt;
}&lt;BR /&gt;
if (input.selectedCloud == (‘Devcenter2’))&lt;BR /&gt;
{&lt;BR /&gt;
results.push({name:data[1].name, value:data[1].value});&lt;BR /&gt;
}&lt;BR /&gt;
Thanks&lt;BR /&gt;
Mousami&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2023 08:53:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/translation-script-with-manual-optionlist/m-p/7249501#M2675</guid>
      <dc:creator />
      <dc:date>2023-06-22T08:53:25Z</dc:date>
    </item>
    <item>
      <title>Re: Translation script with Manual Optionlist</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/translation-script-with-manual-optionlist/m-p/7249502#M2676</link>
      <description>&lt;P&gt;To troubleshoot this may be first  try to print input.selectedCloud and verify that   you are getting the expected value.&lt;/P&gt;
&lt;P&gt;console.log(input.selectedCloud)&lt;/P&gt;
&lt;P&gt;I can see in the first  screenshot the value used in if statement is ‘DEVVcenter1’ and in the second  post different string is used in  if statement ‘Devcenter1’.&lt;/P&gt;
&lt;P&gt;Thanks&lt;BR /&gt;
Mousami&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2023 14:55:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/translation-script-with-manual-optionlist/m-p/7249502#M2676</guid>
      <dc:creator />
      <dc:date>2023-06-22T14:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: Translation script with Manual Optionlist</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/translation-script-with-manual-optionlist/m-p/7249503#M2677</link>
      <description>&lt;P&gt;6.0.2 LTS version&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2023 13:59:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/translation-script-with-manual-optionlist/m-p/7249503#M2677</guid>
      <dc:creator />
      <dc:date>2023-06-23T13:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: Translation script with Manual Optionlist</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/translation-script-with-manual-optionlist/m-p/7249504#M2678</link>
      <description>&lt;P&gt;Thanks, I have sanitised the content. So those are not the exact vcentres listed.&lt;/P&gt;
&lt;P&gt;I presume the console log is within the appliance?&lt;/P&gt;
&lt;P&gt;I have looked at the content from chrome developer tools to spot what is being selected, so I’m hoping it would be the same.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;DIV class="lightbox-wrapper"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/150080i2F5CACD1EAAFEAC4/image-size/large?v=v2&amp;amp;px=2000" role="button" title="f2a43544c1bcccfe719afbea54d160b961031609.png" alt="f2a43544c1bcccfe719afbea54d160b961031609.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2023 15:45:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/translation-script-with-manual-optionlist/m-p/7249504#M2678</guid>
      <dc:creator />
      <dc:date>2023-06-22T15:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: Translation script with Manual Optionlist</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/translation-script-with-manual-optionlist/m-p/7249505#M2679</link>
      <description>&lt;P&gt;It’s hard to pick out from the screen grab, but I think you’re going to need dependent inputs.  So, one gets  chosen and that triggers the next to update, and run it’s translation script, which gives you the filtered output.&lt;/P&gt;
&lt;P&gt;You can grab the value of a previous input using “input.{fieldname}” type syntax,  which will give you a value you can then use in the if statement I can see.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2023 21:28:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/translation-script-with-manual-optionlist/m-p/7249505#M2679</guid>
      <dc:creator>Ollie-Phillips</dc:creator>
      <dc:date>2023-06-21T21:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: Translation script with Manual Optionlist</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/translation-script-with-manual-optionlist/m-p/7249506#M2680</link>
      <description>&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;Tried that and when I change from = to == the size goes to 0 for the results.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;DIV class="lightbox-wrapper"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/149621i3AC573978644A264/image-size/large?v=v2&amp;amp;px=2000" role="button" title="490f1a673e330d92ba0543169523a76e548d7d2b.png" alt="490f1a673e330d92ba0543169523a76e548d7d2b.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;if I leave it just = only devcenter1 appears in the list regardless. If I enter something random in like if (input.selectedCloud == (‘xxxx’))it still triggers the push.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2023 14:02:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/translation-script-with-manual-optionlist/m-p/7249506#M2680</guid>
      <dc:creator />
      <dc:date>2023-06-22T14:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: Translation script with Manual Optionlist</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/translation-script-with-manual-optionlist/m-p/7249507#M2681</link>
      <description>&lt;P&gt;Got it working.&lt;/P&gt;
&lt;P&gt;I did not have real-time selected:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/150295i7BC0B2DE0CFFF5C0/image-size/large?v=v2&amp;amp;px=2000" role="button" title="05b64bf1d8d44ab3c44684b697a4c2d63762fbae.png" alt="05b64bf1d8d44ab3c44684b697a4c2d63762fbae.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2023 15:13:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/translation-script-with-manual-optionlist/m-p/7249507#M2681</guid>
      <dc:creator />
      <dc:date>2023-06-23T15:13:27Z</dc:date>
    </item>
    <item>
      <title>Re: Translation script with Manual Optionlist</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/translation-script-with-manual-optionlist/m-p/7249508#M2682</link>
      <description>&lt;P&gt;Quick question.  Are you on the 6.1.x branch of Morpheus or plan on upgrading to the 6.2.0 branch next month?   We will be introducing a VMware folder select list within the form build to make this more native.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2023 16:12:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/translation-script-with-manual-optionlist/m-p/7249508#M2682</guid>
      <dc:creator>cbunge</dc:creator>
      <dc:date>2023-06-22T16:12:55Z</dc:date>
    </item>
  </channel>
</rss>

