web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Set a default currency...
Power Apps
Suggested Answer

Set a default currency value based on a choice field?

(0) ShareShare
ReportReport
Posted on by 84
Hi Everyone,
 
Am hoping I could get some help please? I have a Power Apps form sourced from SharePoint and in the form, I have a Choice and Amount field.
 
In the Choice field, the values are Choice1 and Choice2. If the user picks Choice1 then I would like the Amount field to default to $100,000 or if Choice2 is chosen then default to $200,000 else 0.
 
I have tried setting the Default of the Amount field to: 
 
Test #1: Somewhat works, no Update field error and while the "2025 Choices'.Value" is blank, the default value shows $200,000 but if I change the "2025 Choices'.Value" = Choice1, the Amount field is not updated.
 
If(ThisItem.'2025 Choices'.Value = "Choice1", "$100,000", "$200,000")
 
 
Test #2: Not sure if this works because I do not know how to fix the error coming from the Update field :(
If(ThisItem.'2025 Choices'.Value = "Choice1", "$100,000" Or ThisItem.'2025 Choices'.Value = "Choice2", "$200,000", "$0")
 
Update field error: 
 
Thank you so much in advance!
MT
 
 
 
Categories:
I have the same question (0)
  • Suggested answer
    ronaldwalcott Profile Picture
    3,847 Super User 2025 Season 2 on at
    Remove the formatting from your If
    To format set the Text Value of the field to something like Text(theColumnName, "$#,##0")
     
    Change your If to something like this assuming you are using numbers and not text
    If( ThisItem.'2025 Choices'.Value = "Choice1", 100000, If( ThisItem.'2025 Choices'.Value = "Choice2", 200000, 0 ) )
  • CU16101721-1 Profile Picture
    84 on at
    Thank so much for the speedy response, Ronald!
     
    It seems to work but I do not see the value in the Amount field until after I submit form, is this normal? I was expecting the Amount field would populate after I pick something in Choices dropdown.
     
    Also, I have a Quantity and a Total field, where the user will enter a number in Quantity then it should be Quantity multiplied by the Amount value for the Total field. The formula is in the SharePoint List, Total column.
     
    Without the If statements, the formula worked but now I just see 0.
     
    Any ideas please?
  • CU16101721-1 Profile Picture
    84 on at
    Hi Ronald, the formula you suggested did not update in SharePoint hence the Total field is 0.
     
    Is there something I need to add to this? Please advise.
     
    If( ThisItem.'2025 Choices'.Value = "Choice1", 100000, If( ThisItem.'2025 Choices'.Value = "Choice2", 200000, 0 ) )
  • ronaldwalcott Profile Picture
    3,847 Super User 2025 Season 2 on at
    Assuming that the choices option is only for new screens try these changes
    Create a variable varAmount in the OnVisible of the screen
    Set (varAmount, 0)
     
    Set the default field of the amount to something like this where EditForm1 is the name of the screen
     
    If(
        EditForm1.Mode = FormMode.New,
        varAmount,
        Parent.Default)
     
    Then in the OnChange of the choice field something more like this, When the varAmount changes the display should change
    Set( varAmount, If( ComboBox1.Selected.Value = "Choice1", 100000, If( ComboBox1.Selected.Value = "Choice2", 200000, 0 ) ) )
     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard