Hello,
I have a combobox in which I am loading values from the database, which means that the datasource for the combo box is a table, in the property, On its display field I have selected one field from the table which is displaying in combo box dropdown. Under the OnChange event i am using the following code ( i have tried this code under OnSelect event as well )
UpdateContext( { CPIModPropertyContext3: LookUp( '[dbo].[CPI]', CPI_Name_ID = Value(CPI_Mod_List_Label2.Text) ) } )
I want to load the values in textboxes and in other dropdowns based on the value when it changes in combo box. In the default value of the text value, I am using
CPIModPropertyContext3.DatabaseValue
I want to change the value of textbox and other controls on form when a different value is selected in Combo box download. Can any PowerApps guru help me here please?
I also wanted to know that the primary key in table is an autogenerated number. I want to display that in the combobox but even though i have connected the table as datasource of combobox, still that field ID which is auto-generated is not appearning in combobox, can you also help with this as well please
Solved! Go to Solution.
hi @Anonymous,
First issue:
Can you share a bit more about your issue?
Do you want to load values in text box and other dropdowns based on the selected value within the combo box in the same screen?
I made a test.
I create a SQL table named CPI.” ID” field and” CPI_Name_ID” field are both number .”column2” field is varchar.
Set the Onchange property of combo box to:
UpdateContext({CPIModPropertyContext3: LookUp('[dbo].[CPI]',ComboBox1.Selected.column2=column2)})
Set the default property of textinput control to:
CPIModPropertyContext3.ID
Set the items property of dropdown control to:
CPIModPropertyContext3
Second issue:
Do you also want to display a auto-generated column (int type) within the Combo Box control?
Currently, the auto-generated column (int type) is not supported within Combo Box control.
regards,
eason
hi @Anonymous,
First issue:
Can you share a bit more about your issue?
Do you want to load values in text box and other dropdowns based on the selected value within the combo box in the same screen?
I made a test.
I create a SQL table named CPI.” ID” field and” CPI_Name_ID” field are both number .”column2” field is varchar.
Set the Onchange property of combo box to:
UpdateContext({CPIModPropertyContext3: LookUp('[dbo].[CPI]',ComboBox1.Selected.column2=column2)})
Set the default property of textinput control to:
CPIModPropertyContext3.ID
Set the items property of dropdown control to:
CPIModPropertyContext3
Second issue:
Do you also want to display a auto-generated column (int type) within the Combo Box control?
Currently, the auto-generated column (int type) is not supported within Combo Box control.
regards,
eason
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
201 | |
175 | |
60 | |
32 | |
30 |
User | Count |
---|---|
307 | |
263 | |
104 | |
79 | |
56 |