Skip to main content

Notifications

Community site session details

Community site session details

Session Id : fBpsmDwQkVr5fJBIxt7bCv
Power Apps - Building Power Apps
Unanswered

Auto Currency selection depending on Region

Like (1) ShareShare
ReportReport
Posted on 26 Mar 2025 16:59:47 by 107
 Dear Community,
 
I have Rates SharePoint list with following columns. 
 
Title Single line of text
Chargeback Type Choice
Site Choice
Chargeback Rate Currency
 
I use another list customized form where Based on Site drop down, I populate certain values 
If(
    IsBlank('EMA Site_DataCard1'.Update),
    "NaN",
    Text(LookUp(SCB_Rates, Site.Value = 'EMA Site_DataCard1'.Update && 'Chargeback Type'.Value = "Cost to Document").'Chargeback Rate' * _Rate, "00.00")
)
Now I want to have a THR value under Site column which selected should give me a flexibility to fetch values in THB or USD. But currency column is set in USD.
How can I have this flexibility of either in THR or USD. Is adding another column an option here?
 
Thanks
  • Suggested answer
    vipuljain03 Profile Picture
    415 on 03 Apr 2025 at 12:43:01
    Auto Currency selection depending on Region
    If I understand it correctly, your requirement is If THR is selected in Site, and THB is selected in the currency dropdown, the formula applies the conversion rate. Otherwise, it defaults to USD.
     
    > Create a new Choice column in your list (e.g., Currency Type) with values USD and THB. Add a dropdown in your Power Apps form for users to select the currency.
     
    > Modify your formula:
    If(
        IsBlank('EMA Site_DataCard1'.Update),
        "NaN",
        With(
            {
                baseRate: LookUp(SCB_Rates, Site.Value = 'EMA Site_DataCard1'.Update && 'Chargeback Type'.Value = "Cost to Document").'Chargeback Rate'
            },
            Text(
                baseRate * _Rate * If(Dropdown_Currency.Selected.Value = "THB", ExchangeRate, 1),
                "00.00"
            )
        )
    )
    Dropdown_Currency refers to the currency selection dropdown.
    ExchangeRate is a variable that holds the USD to THB conversion rate.
     
    > In OnVisible property of the screen, set the exchange rate:
     
    UpdateContext({ExchangeRate: 35}) // Example: 1 USD = 35 THB
     
    -----------------------------------------------
    If this reply helped you, please mark this reply as suggested answer ✔️ and give it a like to help others in the community find the answer too!
    Thanks,
    Vipul
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,518 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,692 Most Valuable Professional

Leaderboard
Loading started