
Announcements
Hello, I was wondering how I could populate a data table using a combo box but be able to edit one of the fields in that recently-populated row. I was able to populate just fine with a regular data table (however I need to edit a Priority field, and that cannot be done in this case). Any help would be appreciated!
Hi @kfusha,
To achieve this, you can use a combination of a combo box and a data table in PowerApps. Here’s how you can dynamically populate a data table using a combo box and allow editing of specific fields:
Create a Combo Box:
Add a combo box control to your screen.
Configure the combo box to display the relevant options (e.g., Priority values).
Create a Data Table:
Add a data table control to your screen.
Bind the data table to your data source (e.g., SharePoint list or collection).
Populate Data Table Based on Combo Box Selection:
In the combo box’s OnChange property, set the data table’s Items property to filter the data based on the selected value from the combo box.
Example:
OnChange:
ClearCollect(
MyFilteredData,
Filter(MyDataSource, Priority = ComboBox1.Selected.Value)
)
DataTable1.Items = MyFilteredData
Editable Fields in Data Table:
Add columns to your data table for the fields you want to edit (e.g., Priority).
Set the Editable property of the relevant columns to true.
Users can now edit the Priority field directly within the data table.
Remember to adjust the control names, data source, and field names according to your specific app. This approach allows you to dynamically populate the data table based on the combo box selection and edit specific fields.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Sunil Pashikanti - Tech Blog: PowerApps