Example - How to use a drop down control to convert currencies
For cases where we want to display values or prices in a different currency, this post describes a simple example of how to use a drop-down box to display the converted value.
Creating a table of exchange rates
The key thing that's required is a table of currency exchange rates. A good place to store this data is in a SharePoint list.
To support this, we can build some external processes to keep these values up to date. There is a good blog post by Ryan Maclean on how to do this with Power Automate and custom connectors.
For this example, we'll create a collection that stores the exchange rate values using the formula beneath. This collection stores the exchange rate from US dollars. We can add this formula to the OnStart or OnVisible properties of the app or screen respectively.
Currency:"Chinese Yuan Renminbi",
Adding the currency drop down control to a form From our app, we can then add a drop-down control (ddCurrency) and set the Items property to colExchangeRates.
ThisItem.AquisitionPrice * ddCurrency.Selected.Rate
- Data - How to group data in a gallery and calculate sums
- Formula - How to calculate compound interest
- Utilities - The best way to peform OCR on images of Power Apps Formulas
- Formula - How to parse JSON in Power Apps- 4 examples
- Data - How to get a row by ordinal number
- Formula - What to do when the If statement doesn't work?
- Formula - Boolean And / Or operators - What is the order of precedence?
- Controls - How to set the data source of a Combo Box to a comma separated string
- Numbers - 10 examples of how to round numbers
- Formula - Difference between round, square, and curly brackets
- Top 3 highlights of upcoming enhancements to the Power Apps language (Power FX)
- Email - Sending email attachments with the Office 365 Outlook connector
- Formula - What to try when numbers don't format correctly
- Controls - How to convert HTML to Text
- Formulas - how to return all days between two dates
- Formula - How to create comma separated (CSV) list of items
- Formula - How to use the IF and Switch functions - 3 common examples
- Location - Finding the closest location and and sorting records by distance, based on the current location of the user
- Formulas - How to cope with weekends and public holidays in date calculations