<?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 How to connect 3 comboboxes and Textbox?  POWERSHELL and WPF in Vault Customization Forum</title>
    <link>https://forums.autodesk.com/t5/vault-customization-forum/how-to-connect-3-comboboxes-and-textbox-powershell-and-wpf/m-p/5935965#M8843</link>
    <description>&lt;P&gt;&lt;BR /&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;here is my problem. I have 3 comboboxes that read data from mdf file. Selected value from the first one will affect on what shows in the second one, and selected value from the second one will affect on what shows in the third one. Result from the third one will populate in the textbox.&lt;BR /&gt;See attached picture.&lt;/P&gt;&lt;P&gt;Here is a code from PowerShell.&lt;IMG title="combobox.jpg" alt="combobox.jpg" src="https://forums.autodesk.com/t5/image/serverpage/image-id/204513i1183236ED8DE3770/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;function GetData()
{
	$objOleDbConnection1= New-Object "System.Data.OleDb.OleDbConnection"
	$objOleDbCommand = New-Object "System.Data.OleDb.OleDbCommand"
	$objOleDbAdapter = New-Object "System.Data.OleDb.OleDbDataAdapter"
	$objDataTable = New-Object "System.Data.DataTable"
	$objOleDbConnection1.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Script\test_1.mdb;"
	$objOleDbConnection1.Open()
	$objOleDbCommand.Connection = $objOleDbConnection1
    $objOleDbCommand.CommandText = "SELECT SORT + ' ' + '-' + ' ' + Tekst, SAPstruktur FROM SAPstruktur where SAPstruktur like 'A__' ORDER BY ID ASC"
	#set the Adapter object
	$objOleDbAdapter.SelectCommand = $objOleDbCommand
	#fill the objDataTable object with the results
	$objOleDbAdapter.Fill($objDataTable)
	return $objDataTable.DefaultView
	$objOleDbConnection1.Close()
	
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;And here is code from Combobox no 1&amp;nbsp;i WPF&lt;/P&gt;&lt;PRE&gt;&amp;lt;ComboBox x:Name="mdb" HorizontalAlignment="Left" VerticalAlignment="Top" Width="275" Grid.Column="1"  DisplayMemberPath="Expr1000" SelectedValuePath="SAPstruktur" ItemsSource="{Binding PsList[GetData]}" SelectedIndex="0"/&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;QUESTION IS: How to connect all these 3 comboboxes and Textbox? Of cource i need to create 2 more comboboxes &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Greetings&lt;BR /&gt;Lukas&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 04 Dec 2015 11:45:18 GMT</pubDate>
    <dc:creator>L00K</dc:creator>
    <dc:date>2015-12-04T11:45:18Z</dc:date>
    <item>
      <title>How to connect 3 comboboxes and Textbox?  POWERSHELL and WPF</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/how-to-connect-3-comboboxes-and-textbox-powershell-and-wpf/m-p/5935965#M8843</link>
      <description>&lt;P&gt;&lt;BR /&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;here is my problem. I have 3 comboboxes that read data from mdf file. Selected value from the first one will affect on what shows in the second one, and selected value from the second one will affect on what shows in the third one. Result from the third one will populate in the textbox.&lt;BR /&gt;See attached picture.&lt;/P&gt;&lt;P&gt;Here is a code from PowerShell.&lt;IMG title="combobox.jpg" alt="combobox.jpg" src="https://forums.autodesk.com/t5/image/serverpage/image-id/204513i1183236ED8DE3770/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;function GetData()
{
	$objOleDbConnection1= New-Object "System.Data.OleDb.OleDbConnection"
	$objOleDbCommand = New-Object "System.Data.OleDb.OleDbCommand"
	$objOleDbAdapter = New-Object "System.Data.OleDb.OleDbDataAdapter"
	$objDataTable = New-Object "System.Data.DataTable"
	$objOleDbConnection1.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Script\test_1.mdb;"
	$objOleDbConnection1.Open()
	$objOleDbCommand.Connection = $objOleDbConnection1
    $objOleDbCommand.CommandText = "SELECT SORT + ' ' + '-' + ' ' + Tekst, SAPstruktur FROM SAPstruktur where SAPstruktur like 'A__' ORDER BY ID ASC"
	#set the Adapter object
	$objOleDbAdapter.SelectCommand = $objOleDbCommand
	#fill the objDataTable object with the results
	$objOleDbAdapter.Fill($objDataTable)
	return $objDataTable.DefaultView
	$objOleDbConnection1.Close()
	
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;And here is code from Combobox no 1&amp;nbsp;i WPF&lt;/P&gt;&lt;PRE&gt;&amp;lt;ComboBox x:Name="mdb" HorizontalAlignment="Left" VerticalAlignment="Top" Width="275" Grid.Column="1"  DisplayMemberPath="Expr1000" SelectedValuePath="SAPstruktur" ItemsSource="{Binding PsList[GetData]}" SelectedIndex="0"/&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;QUESTION IS: How to connect all these 3 comboboxes and Textbox? Of cource i need to create 2 more comboboxes &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Greetings&lt;BR /&gt;Lukas&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Dec 2015 11:45:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/how-to-connect-3-comboboxes-and-textbox-powershell-and-wpf/m-p/5935965#M8843</guid>
      <dc:creator>L00K</dc:creator>
      <dc:date>2015-12-04T11:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to connect 3 comboboxes and Textbox?  POWERSHELL and WPF</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/how-to-connect-3-comboboxes-and-textbox-powershell-and-wpf/m-p/5937410#M8844</link>
      <description>Anyone?:(</description>
      <pubDate>Sat, 05 Dec 2015 11:43:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/how-to-connect-3-comboboxes-and-textbox-powershell-and-wpf/m-p/5937410#M8844</guid>
      <dc:creator>L00K</dc:creator>
      <dc:date>2015-12-05T11:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to connect 3 comboboxes and Textbox?  POWERSHELL and WPF</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/how-to-connect-3-comboboxes-and-textbox-powershell-and-wpf/m-p/5939277#M8845</link>
      <description>&lt;P&gt;Can anyone help me out here? I'm really stacked, and can't find any way to break it through...I managed to trigger seperate comboboxes and return a value to combobox in Data Standard Dialog window. I was sure that by this i can send value of&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;$Prop&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;[&lt;/FONT&gt;&lt;FONT color="#800000" face="Courier New" size="2"&gt;"Tegningstype"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;].Value&lt;/FONT&gt; back to Powershell, and put it into the new query that is in the functions triggered by combobox no.2.&lt;/P&gt;&lt;P&gt;Unfortunately it does not work, value from $prop is not returned to Powershell.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it wrong way to do this or i forgot about something here?&lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2015 14:38:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/how-to-connect-3-comboboxes-and-textbox-powershell-and-wpf/m-p/5939277#M8845</guid>
      <dc:creator>L00K</dc:creator>
      <dc:date>2015-12-07T14:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to connect 3 comboboxes and Textbox?  POWERSHELL and WPF</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/how-to-connect-3-comboboxes-and-textbox-powershell-and-wpf/m-p/5943896#M8846</link>
      <description>Come on people:)&lt;BR /&gt;&lt;BR /&gt;So many experts er here... No one knows how to do it???&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 09 Dec 2015 16:20:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/how-to-connect-3-comboboxes-and-textbox-powershell-and-wpf/m-p/5943896#M8846</guid>
      <dc:creator>L00K</dc:creator>
      <dc:date>2015-12-09T16:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to connect 3 comboboxes and Textbox?  POWERSHELL and WPF</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/how-to-connect-3-comboboxes-and-textbox-powershell-and-wpf/m-p/5947476#M8847</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you could do the following.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Hook an event handler to first combobox selectionchanged event.&amp;nbsp;&lt;PRE&gt;$firstcombobox = $dsWindow.FindName("mdb")
$firstcombobox.add_SelectionChanged(
{
param($sender,$args)
})&lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;Inside the handler you can collect the selected value which you can use to get the values for the second combobox&lt;PRE&gt;$selectedValue = $sender.SelectedValue
$itemsForSecondCombobox = #collect the items
$secondcombobox = $dsWindow.FindName("SecondCombobox")
$secondcombobox.ItemsSource = $itemsForSecondCombobox&lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;Repeat the same for the second combobox and third combobox&lt;/LI&gt;&lt;LI&gt;For the third combobox use the selectedvalue to populate the textbox&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Hope it helps!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wangdu&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;coolOrange&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.coolOrange.com" target="_blank"&gt;www.coolOrange.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2015 13:22:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/how-to-connect-3-comboboxes-and-textbox-powershell-and-wpf/m-p/5947476#M8847</guid>
      <dc:creator>wangdu</dc:creator>
      <dc:date>2015-12-11T13:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to connect 3 comboboxes and Textbox?  POWERSHELL and WPF</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/how-to-connect-3-comboboxes-and-textbox-powershell-and-wpf/m-p/5947943#M8848</link>
      <description>&lt;P&gt;Thanks for responce. I'm a newbe in this kind of programming...and might ask stupid questions, but what you mean by "hooking to"?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2015 17:39:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/how-to-connect-3-comboboxes-and-textbox-powershell-and-wpf/m-p/5947943#M8848</guid>
      <dc:creator>L00K</dc:creator>
      <dc:date>2015-12-11T17:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to connect 3 comboboxes and Textbox?  POWERSHELL and WPF</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/how-to-connect-3-comboboxes-and-textbox-powershell-and-wpf/m-p/5947993#M8849</link>
      <description>&lt;P&gt;could you please walk me through???&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2015 18:20:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/how-to-connect-3-comboboxes-and-textbox-powershell-and-wpf/m-p/5947993#M8849</guid>
      <dc:creator>L00K</dc:creator>
      <dc:date>2015-12-11T18:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to connect 3 comboboxes and Textbox?  POWERSHELL and WPF</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/how-to-connect-3-comboboxes-and-textbox-powershell-and-wpf/m-p/5949768#M8850</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the InitializeWindow function of the Default.ps1 file, Add the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$firstcombobox = $dsWindow.FindName("mdb")
$secondcombobox = $dsWindow.FindName("SecondCombobox")
$thirdcombobox= $dsWindow.FindName("thirdcombobox")

$firstcombobox.add_SelectionChanged(
{
param($sender,$args)
FeedCombobox($sender.SelectedValue, $secondCombobox)
})

$secondcombobox .add_SelectionChanged(
{
param($sender,$args)
FeedCombobox($sender.SelectedValue, $thirdcombobox)
})

$thirdcombobox.add_SelectionChanged(
{
param($sender,$args)
$textbox= $dsWindow.FindName("textbox1")
$textbox.Text = $send.SelectedValue
})&lt;/PRE&gt;&lt;P&gt;Now define the FeedCombobox function like this in the Default.ps1. This function can be called for both from first and second combobox selectionchanged event handler.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;function FeedCombobox($selectedValue, $cmbbx)
{
     $itemsForCombobox = #collect the items using the selectedValue by making sql queries here
     $cmbbx.ItemsSource = $itemsForCombobox 
}&lt;/PRE&gt;&lt;P&gt;Please make sure that you have defined three comboboxes and textbox with the name used in the script. Note also that the SelectedValuePath is used and defined correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope it helps!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wangdu&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;coolOrange&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.coolOrange.com" target="_blank"&gt;www.coolOrange.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2015 07:52:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/how-to-connect-3-comboboxes-and-textbox-powershell-and-wpf/m-p/5949768#M8850</guid>
      <dc:creator>wangdu</dc:creator>
      <dc:date>2015-12-14T07:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to connect 3 comboboxes and Textbox?  POWERSHELL and WPF</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/how-to-connect-3-comboboxes-and-textbox-powershell-and-wpf/m-p/5949881#M8851</link>
      <description>&lt;P&gt;Thanks you very much for all your help.&lt;BR /&gt;&lt;BR /&gt;Here is what i have now in WPF:&lt;/P&gt;&lt;PRE&gt;&amp;lt;ComboBox x:Name="mdb" HorizontalAlignment="Left" VerticalAlignment="Top" Width="275" Grid.Column="1"  DisplayMemberPath="Expr1000" SelectedValuePath="SAPstruktur" ItemsSource="{Binding PsList[GetData]}" SelectedIndex="0" /&amp;gt;
            &amp;lt;ComboBox x:Name="SecondCombobox" HorizontalAlignment="Left" VerticalAlignment="Top" Width="275"  DisplayMemberPath="Expr1000" SelectedValuePath="SAPstruktur" SelectedIndex="0" Margin="0,43,0,0" Grid.Column="1" /&amp;gt;
            &amp;lt;ComboBox x:Name="thirdcombobox" HorizontalAlignment="Left" VerticalAlignment="Top" Width="275" Grid.Column="1"  DisplayMemberPath="Expr1000" SelectedValuePath="SAPstruktur"  SelectedIndex="0" Margin="0,91,0,0"/&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And here is content of the ps.1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;function InitializeWindow
{
	$dsWindow.Width = 600
	$dsWindow.Height = 400
	$dsDiag.ShowLog()
	$dsDiag.Clear() 
	$firstcombobox = $dsWindow.FindName("mdb")
	$secondcombobox = $dsWindow.FindName("SecondCombobox")
	$thirdcombobox= $dsWindow.FindName("thirdcombobox")

	$firstcombobox.add_SelectionChanged(
	{
	param($sender,$args)
	FeedCombobox($sender.SelectedValue, $secondCombobox)
	})

	$secondcombobox.add_SelectionChanged(
	{	
	param($sender,$args)
	FeedCombobox($sender.SelectedValue, $thirdcombobox)
	})

	$thirdcombobox.add_SelectionChanged(
{	
	param($sender,$args)
	$textbox= $dsWindow.FindName("text_combobox")
	$textbox.Text = $send.SelectedValue
	})&lt;/PRE&gt;&lt;PRE&gt;function FeedCombobox($selectedValue, $cmbbx)
{
    $objOleDbConnection1= New-Object "System.Data.OleDb.OleDbConnection"
	$objOleDbCommand = New-Object "System.Data.OleDb.OleDbCommand"
	$objOleDbAdapter = New-Object "System.Data.OleDb.OleDbDataAdapter"
	$objDataTable = New-Object "System.Data.DataTable"
	$objOleDbConnection1.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Script\test_1.mdb;"
	$objOleDbConnection1.Open()
	$objOleDbCommand.Connection = $objOleDbConnection1
    $objOleDbCommand.CommandText = "SELECT SAPstruktur + ' ' + '-' + ' ' + Tekst, SAPstruktur FROM SAPstruktur where SAPstruktur like 'NK' ORDER BY ID ASC" 
	$itemsForCombobox = "SELECT SAPstruktur + ' ' + '-' + ' ' + Tekst, SAPstruktur FROM SAPstruktur where SAPstruktur = '$selectedValue' ORDER BY ID ASC" 
    $cmbbx.ItemsSource = $itemsForCombobox 
	#set the Adapter object
	$objOleDbAdapter.SelectCommand = $objOleDbCommand
	#fill the objDataTable object with the results
	$objOleDbAdapter.Fill($objDataTable)
	#$mdb.ItemsSource = @($objDataTable)
	#$mdb.DisplayMemberPath = "Expr1000"
	#$mdb.SelectedValuePath = "SAPstruktur"
	#To display the "raw" contents, just enter
	return $objDataTable.DefaultView
	$objOleDbConnection1.Close()
	
}&lt;/PRE&gt;&lt;P&gt;Content of combobox "mdb"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;function GetData
{
	$objOleDbConnection1= New-Object "System.Data.OleDb.OleDbConnection"
	$Tier2ClassificationCategory = New-Object System.Windows.Forms.ComboBox
	$objOleDbCommand = New-Object "System.Data.OleDb.OleDbCommand"
	$objOleDbAdapter = New-Object "System.Data.OleDb.OleDbDataAdapter"
	$objDataTable = New-Object "System.Data.DataTable"
	$objOleDbConnection1.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Script\test_1.mdb;"
	$objOleDbConnection1.Open()
	$objOleDbCommand.Connection = $objOleDbConnection1
    $objOleDbCommand.CommandText = "SELECT SORT + ' ' + '-' + ' ' + Tekst, SAPstruktur FROM SAPstruktur where SAPstruktur like 'A__' ORDER BY ID ASC"
	#set the Adapter object
	$objOleDbAdapter.SelectCommand = $objOleDbCommand
	$Tier2ClassificationCategory.SelectedIndex = -1
	#fill the objDataTable object with the results
	$objOleDbAdapter.Fill($objDataTable)
	#To display the "raw" contents, just enter
	return $objDataTable.DefaultView
	$objOleDbConnection1.Close()
}&lt;/PRE&gt;&lt;P&gt;Before each of&amp;nbsp; comboboxes had its own "GetData" function. Now logically only the first one will have it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not sure if i do all correct, because i do not get any results in Secondcombobox.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do i need to do any changes to binding between comboboxes and ps1? What should be binded to ItemsSource i WPF?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2015 10:11:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/how-to-connect-3-comboboxes-and-textbox-powershell-and-wpf/m-p/5949881#M8851</guid>
      <dc:creator>L00K</dc:creator>
      <dc:date>2015-12-14T10:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to connect 3 comboboxes and Textbox?  POWERSHELL and WPF</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/how-to-connect-3-comboboxes-and-textbox-powershell-and-wpf/m-p/5960169#M8852</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For filling up the second combobox, you have to do it similar to how you have done in the GetData function. The GetData function returns the $objDataTable.GetDefaultView(). So, then, instead of now returning it in FeedCombobox function, it assigns it directly to the $cmbbx.ItemsSource. Here's an example below:&lt;/P&gt;&lt;PRE&gt;#trimmed 
$objOleDbCommand.CommandText = "SELECT SORT + ' ' + '-' + ' ' + Tekst, SAPstruktur FROM SAPstruktur where SAPstruktur like 'A__' ORDER BY ID ASC"
#set the Adapter object
$objOleDbAdapter.SelectCommand = $objOleDbCommand
$objOleDbAdapter.Fill($objDataTable)
$cmbbx.ItemsSource = $objDataTable.DefaultView&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Hope it helps!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wangdu&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;coolOrange&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.coolOrange.com" target="_blank"&gt;www.coolOrange.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2015 11:29:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/how-to-connect-3-comboboxes-and-textbox-powershell-and-wpf/m-p/5960169#M8852</guid>
      <dc:creator>wangdu</dc:creator>
      <dc:date>2015-12-21T11:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to connect 3 comboboxes and Textbox?  POWERSHELL and WPF</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/how-to-connect-3-comboboxes-and-textbox-powershell-and-wpf/m-p/6000876#M8853</link>
      <description>Thanks for responce...Could you please show me "literally" how to do this? f.e. linking cmb1 and cmb2???&lt;BR /&gt;It does not work for me her .(</description>
      <pubDate>Fri, 22 Jan 2016 08:10:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/how-to-connect-3-comboboxes-and-textbox-powershell-and-wpf/m-p/6000876#M8853</guid>
      <dc:creator>L00K</dc:creator>
      <dc:date>2016-01-22T08:10:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to connect 3 comboboxes and Textbox?  POWERSHELL and WPF</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/how-to-connect-3-comboboxes-and-textbox-powershell-and-wpf/m-p/6000887#M8854</link>
      <description>hmm i have looked at this problem once again. And i if get $cmbbx.ItemsSource. from the first cmbx how to use this in order to read from database new values. As i tried to explan, the thing is to get in the first cmbx full lists of values (this works). Then with picked up value form the first cmbx use this value to selec values for the second cmbx. And similar action for the third one. So to picture this a bit better imagine that you er i a library and there is a choise: 1. Type of books (drama, crime aso). - reader picked the type 2. Then he get a choice of "language" - reader picked "english" 3. Then the third choise of "writer" - reader picked "tom Clancy". This is how i want to organize my comboboxes. I make 3 selects from the database, one for each cmbx... Step 1 is done :)) Step 2 and 3...does not work.....:)</description>
      <pubDate>Fri, 22 Jan 2016 08:31:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/how-to-connect-3-comboboxes-and-textbox-powershell-and-wpf/m-p/6000887#M8854</guid>
      <dc:creator>L00K</dc:creator>
      <dc:date>2016-01-22T08:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to connect 3 comboboxes and Textbox?  POWERSHELL and WPF</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/how-to-connect-3-comboboxes-and-textbox-powershell-and-wpf/m-p/6001380#M8855</link>
      <description>&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Lets say this is your xaml&lt;/P&gt;&lt;PRE&gt;&amp;lt;ComboBox x:Name="mdb" HorizontalAlignment="Left" VerticalAlignment="Top" Width="275" Grid.Column="1"  DisplayMemberPath="Expr1000" SelectedValuePath="SAPstruktur" ItemsSource="{Binding PsList[GetData]}" SelectedIndex="0" /&amp;gt;
            &amp;lt;ComboBox x:Name="SecondCombobox" HorizontalAlignment="Left" VerticalAlignment="Top" Width="275"  DisplayMemberPath="Expr1000" SelectedValuePath="SAPstruktur" SelectedIndex="0" Margin="0,43,0,0" Grid.Column="1" /&amp;gt;
            &amp;lt;ComboBox x:Name="thirdcombobox" HorizontalAlignment="Left" VerticalAlignment="Top" Width="275" Grid.Column="1"  DisplayMemberPath="Expr1000" SelectedValuePath="SAPstruktur"  SelectedIndex="0" Margin="0,91,0,0"/&amp;gt;&lt;/PRE&gt;&lt;P&gt;And the content of the ps1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;function InitializeWindow
{
	$dsWindow.Width = 600
	$dsWindow.Height = 400
	$dsDiag.ShowLog()
	$dsDiag.Clear() 
	$firstcombobox = $dsWindow.FindName("mdb")
	$secondcombobox = $dsWindow.FindName("SecondCombobox")
	$thirdcombobox= $dsWindow.FindName("thirdcombobox")

	$firstcombobox.add_SelectionChanged(
	{
	param($sender,$args)
        $commandText = "SELECT SAPstruktur + ' ' + '-' + ' ' + Tekst, SAPstruktur FROM SAPstruktur where SAPstruktur = '$sender.SelectedValue' ORDER BY ID ASC"
	FeedCombobox($secondCombobox,, $commandText)
	})

	$secondcombobox.add_SelectionChanged(
	{	
	param($sender,$args)
         $commandText = "SELECT SAPstruktur + ' ' + '-' + ' ' + Tekst, SAPstruktur FROM SAPstruktur where SAPstruktur = '$sender.SelectedValue' ORDER BY ID ASC"
	FeedCombobox($thirdcombobox, $commandText)
	})

	$thirdcombobox.add_SelectionChanged(
	{	
	param($sender,$args)
	$textbox= $dsWindow.FindName("text_combobox")
	$textbox.Text = $send.SelectedValue
	})&lt;BR /&gt;}&lt;/PRE&gt;&lt;PRE&gt;function FeedCombobox($cmbbx, $commandText)
{
    $objOleDbConnection1= New-Object "System.Data.OleDb.OleDbConnection"
	$objOleDbCommand = New-Object "System.Data.OleDb.OleDbCommand"
	$objOleDbAdapter = New-Object "System.Data.OleDb.OleDbDataAdapter"
	$objDataTable = New-Object "System.Data.DataTable"
	$objOleDbConnection1.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Script\test_1.mdb;"
	$objOleDbConnection1.Open()
	$objOleDbCommand.Connection = $objOleDbConnection1
	#set the Adapter object
	$objOleDbAdapter.SelectCommand = $objOleDbCommand
	#fill the objDataTable object with the results
	$$objOleDbCommand.CommandText = $commandText
        #set the Adapter object
        $objOleDbAdapter.SelectCommand = $objOleDbCommand
        $objOleDbAdapter.Fill($objDataTable)
        $cmbbx.ItemsSource = $objDataTable.DefaultView
        $objOleDbConnection1.Close()	
}&lt;/PRE&gt;&lt;PRE&gt;function GetData
{
	$objOleDbConnection1= New-Object "System.Data.OleDb.OleDbConnection"
	$Tier2ClassificationCategory = New-Object System.Windows.Forms.ComboBox
	$objOleDbCommand = New-Object "System.Data.OleDb.OleDbCommand"
	$objOleDbAdapter = New-Object "System.Data.OleDb.OleDbDataAdapter"
	$objDataTable = New-Object "System.Data.DataTable"
	$objOleDbConnection1.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Script\test_1.mdb;"
	$objOleDbConnection1.Open()
	$objOleDbCommand.Connection = $objOleDbConnection1
    $objOleDbCommand.CommandText = "SELECT SORT + ' ' + '-' + ' ' + Tekst, SAPstruktur FROM SAPstruktur where SAPstruktur like 'A__' ORDER BY ID ASC"
	#set the Adapter object
	$objOleDbAdapter.SelectCommand = $objOleDbCommand
	$Tier2ClassificationCategory.SelectedIndex = -1
	#fill the objDataTable object with the results
	$objOleDbAdapter.Fill($objDataTable)
	#To display the "raw" contents, just enter
	return $objDataTable.DefaultView
	$objOleDbConnection1.Close()
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Make sure that the sql query for the thirdcombobox should be replaced with correct query. And also to make sure that a TextBox control in the xaml with the name text_combobox is defined.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope now it works!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wangdu&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2016 14:38:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/how-to-connect-3-comboboxes-and-textbox-powershell-and-wpf/m-p/6001380#M8855</guid>
      <dc:creator>wangdu</dc:creator>
      <dc:date>2016-01-22T14:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to connect 3 comboboxes and Textbox?  POWERSHELL and WPF</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/how-to-connect-3-comboboxes-and-textbox-powershell-and-wpf/m-p/6002829#M8856</link>
      <description>Mane thanks for your help! I so appreciate it! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;I have done copy/paste the code shown above. It seems to be problem with finding second combobox. If i define fixed query (without dynamic value, - SAPstruktur = "fixed value") there is nothing shown i second combobox (and it should show one value selected from the database). What might be missing?? some dll or something i the code?? I do not get it...how to check that combobox has be found in the window. I have checked all names and all seems to be ok.&lt;BR /&gt;Can i send you ps1 and xaml on e-mail so you can look at it??</description>
      <pubDate>Sat, 23 Jan 2016 17:35:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/how-to-connect-3-comboboxes-and-textbox-powershell-and-wpf/m-p/6002829#M8856</guid>
      <dc:creator>L00K</dc:creator>
      <dc:date>2016-01-23T17:35:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to connect 3 comboboxes and Textbox?  POWERSHELL and WPF</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/how-to-connect-3-comboboxes-and-textbox-powershell-and-wpf/m-p/6002837#M8857</link>
      <description>&lt;P&gt;the same here...textbox er not filled up. I have added textbox line to check of there any value sent from the combobox.&lt;/P&gt;&lt;P&gt;Or, there something wrong with sent value (=0 ?)&lt;/P&gt;&lt;P&gt;Do i need to make any changed to Inventor.cfg?? ( register some variable or something?)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$firstcombobox.add_SelectionChanged(
	{
	param($sender,$args)
        $commandText = "SELECT SAPstruktur + ' ' + '-' + ' ' + Tekst, SAPstruktur FROM SAPstruktur where SAPstruktur = '$sender.SelectedValue' ORDER BY ID ASC"
	FeedCombobox($secondCombobox, $commandText)
	$textbox= $dsWindow.FindName("text_combobox")
	$textbox.Text = $send.SelectedValue
	})&lt;/PRE&gt;</description>
      <pubDate>Sat, 23 Jan 2016 17:47:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/how-to-connect-3-comboboxes-and-textbox-powershell-and-wpf/m-p/6002837#M8857</guid>
      <dc:creator>L00K</dc:creator>
      <dc:date>2016-01-23T17:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to connect 3 comboboxes and Textbox?  POWERSHELL and WPF</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/how-to-connect-3-comboboxes-and-textbox-powershell-and-wpf/m-p/6003430#M8858</link>
      <description>&lt;P&gt;There is something wrong..i cannot even hide/show controls from Powershell script. Nothing works, $dsDiag.inspect() - no reaction...script cannot find eny controls in xaml..what might be wrong here??? Any clue?&lt;/P&gt;</description>
      <pubDate>Sun, 24 Jan 2016 14:42:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/how-to-connect-3-comboboxes-and-textbox-powershell-and-wpf/m-p/6003430#M8858</guid>
      <dc:creator>L00K</dc:creator>
      <dc:date>2016-01-24T14:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to connect 3 comboboxes and Textbox?  POWERSHELL and WPF</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/how-to-connect-3-comboboxes-and-textbox-powershell-and-wpf/m-p/6009291#M8859</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am seeing a typo in the code you posted ($send instead of $sender).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As for finding out the issues with the empty combobox, writing out the intermediate states to the DataStandard Log window could help you debug your code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;PRE&gt;$firstcombobox.add_SelectionChanged(
{
	param($sender,$args)&lt;BR /&gt;        $dsDiag.ShowLog()#shows the log window
        $commandText = "SELECT SAPstruktur + ' ' + '-' + ' ' + Tekst, SAPstruktur FROM SAPstruktur where SAPstruktur = '$sender.SelectedValue' ORDER BY ID ASC"
	FeedCombobox($secondCombobox, $commandText)
	$textbox= $dsWindow.FindName("text_combobox")	
        $selectedValue = $sender.SelectedValue
        $dsDiag.Trace("&amp;gt;&amp;gt; $($selectedValue)")#writes to the log window
})&lt;/PRE&gt;&lt;P&gt;Hope it helps!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wangdu&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2016 16:16:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/how-to-connect-3-comboboxes-and-textbox-powershell-and-wpf/m-p/6009291#M8859</guid>
      <dc:creator>wangdu</dc:creator>
      <dc:date>2016-01-27T16:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to connect 3 comboboxes and Textbox?  POWERSHELL and WPF</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/how-to-connect-3-comboboxes-and-textbox-powershell-and-wpf/m-p/6016805#M8860</link>
      <description>Hi, thanks for replay. I have made a new set of files: default.ps1 and inventor.xaml. And used only code for comboboxes. $dsWindow.Name works fine and selected value from firstcombobox is nicely send to textbox. Now, i tried to go further with code you send me and it looks like DataStandard does not like: FeedCombobox($secondcombobox, $commandText). If i "comment" this line then DataStadard window appears, but if i remove "#" then it crashes...I guess there is some little issue that Powershell Script does not like. Any idea what might be wrong with this line? Best Regard Lukas</description>
      <pubDate>Mon, 01 Feb 2016 07:53:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/how-to-connect-3-comboboxes-and-textbox-powershell-and-wpf/m-p/6016805#M8860</guid>
      <dc:creator>L00K</dc:creator>
      <dc:date>2016-02-01T07:53:12Z</dc:date>
    </item>
  </channel>
</rss>

