Search code examples
powerapps

PowerApps: Filter Text Label or Input Label by dropdown menu selection


New to powerapps.

I was wondering if someone could advise on how to get a field to show the value of a particular product based on a dropdown box

I have two tables

Products which includes Products and the price of that product. e.g. Apple £0.50 Another table which this information should feed so if i selected apple it should fill that table with apple and price of apple for £0.50 but i also want it to display on the edit for the value of the chosen dropdown

Thanks


Solution

  • Not sure if I understand you completely.

    If you want to display the selected product's attritbutes elsewhere, refer to them like MyDropdown.Selected.Name and MyDropDown.Selected.Price.

    If you want to save the user's selections in another table: say this is a cart in a webshop. You could simply add the selected item to a collection like Collect(colCart,MyDropdown.Selected). Bind this to thee button's OnSelect property.

    Or you can save the selected item to a data source with Patch: Patch(ordersTable,Defaults(ordersTable),{ itemName: MyDropdown.Selected.Name, itemPrice: MyDropDown.Selected.Price })