<?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 Can't identify the problem in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Can-t-identify-the-problem/m-p/780807#M96324</link>
    <description>&lt;P&gt;Hi !&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wanted to generate a list for a user so he ca choose the abscissa he wants (for a graph) here is the script :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// Créer une liste des options pour la liste déroulante
options = {"Supplier", "Supplier_Quarter"};

// Créer une boîte de dialogue personnalisée avec une liste déroulante
dlg = New Window("Sélectionnez une abscisse de travail",
	&amp;lt;&amp;lt;Modal,
	V List Box(
		Text Box("Sélectionnez une valeur parmi la liste déroulante:"),
		comboBox = Combo Box(options),
		H List Box(
// Créer le bouton OK
			Button Box("OK", dlg &amp;lt;&amp;lt; Close(comboBox &amp;lt;&amp;lt; Get Selected)), 
// Créer le bouton Cancel
			Button Box("Cancel", dlg &amp;lt;&amp;lt; Close(""))
		)
	)
);

// Récupérer la sélection de l'utilisateur
selection = dlg &amp;lt;&amp;lt; Get Result;


Print("Vous avez sélectionné : " || Char(selection));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;EM&gt;Edit (jthi 2024-08-11): added jsl formatting&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the problem : I have a message error : Name Unresolved: Button&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What do I have to do to make it works without issues ?&lt;/P&gt;</description>
    <pubDate>Sun, 11 Aug 2024 15:07:23 GMT</pubDate>
    <dc:creator>PercentileBat71</dc:creator>
    <dc:date>2024-08-11T15:07:23Z</dc:date>
    <item>
      <title>Can't identify the problem</title>
      <link>https://community.jmp.com/t5/Discussions/Can-t-identify-the-problem/m-p/780807#M96324</link>
      <description>&lt;P&gt;Hi !&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wanted to generate a list for a user so he ca choose the abscissa he wants (for a graph) here is the script :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// Créer une liste des options pour la liste déroulante
options = {"Supplier", "Supplier_Quarter"};

// Créer une boîte de dialogue personnalisée avec une liste déroulante
dlg = New Window("Sélectionnez une abscisse de travail",
	&amp;lt;&amp;lt;Modal,
	V List Box(
		Text Box("Sélectionnez une valeur parmi la liste déroulante:"),
		comboBox = Combo Box(options),
		H List Box(
// Créer le bouton OK
			Button Box("OK", dlg &amp;lt;&amp;lt; Close(comboBox &amp;lt;&amp;lt; Get Selected)), 
// Créer le bouton Cancel
			Button Box("Cancel", dlg &amp;lt;&amp;lt; Close(""))
		)
	)
);

// Récupérer la sélection de l'utilisateur
selection = dlg &amp;lt;&amp;lt; Get Result;


Print("Vous avez sélectionné : " || Char(selection));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;EM&gt;Edit (jthi 2024-08-11): added jsl formatting&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the problem : I have a message error : Name Unresolved: Button&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What do I have to do to make it works without issues ?&lt;/P&gt;</description>
      <pubDate>Sun, 11 Aug 2024 15:07:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-t-identify-the-problem/m-p/780807#M96324</guid>
      <dc:creator>PercentileBat71</dc:creator>
      <dc:date>2024-08-11T15:07:23Z</dc:date>
    </item>
    <item>
      <title>Re: Can't identify the problem</title>
      <link>https://community.jmp.com/t5/Discussions/Can-t-identify-the-problem/m-p/780817#M96325</link>
      <description>&lt;P&gt;As you are using modal window, you don't have to close it otherwise. Also dlg doesn't exist after the window has been closed unless you use &amp;lt;&amp;lt;return result. Below is one option what you could do&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

options = {"Supplier", "Supplier_Quarter"};

dlg = New Window("Sélectionnez une abscisse de travail",
	&amp;lt;&amp;lt;Modal,
	&amp;lt;&amp;lt;return result,
	V List Box(
		Text Box("Sélectionnez une valeur parmi la liste déroulante:"),
		comboBox = Combo Box(options),
		H List Box(
			Button Box("OK", selection = comboBox &amp;lt;&amp;lt; Get Selected),
			Button Box("Cancel")
		)
	)
);

show(dlg);
if(dlg["Button"] != 1,
	Throw("Cancelled");
);


Print("Vous avez sélectionné : " || Char(selection));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 11 Aug 2024 15:10:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-t-identify-the-problem/m-p/780817#M96325</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-08-11T15:10:17Z</dc:date>
    </item>
  </channel>
</rss>

