cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
asmith2
Regular Visitor

Possible to force currency entered in increments?

Hi all! I have a form that serves as a cash order. I have text boxes that update the SharePoint list with the amount of denominations they need. The denominations need to be in certain increments, however.

 

For instance,

Ones - increments of $1,000

Twos - increments of $2,000

Fives - increments of $5,000

Tens - increments of $10,000

Twenties - increments of $20,000.

 

I know you can test for a value in-between numbers, but I'm not sure how to enforce that when the number can be so many different options. I have an error box that I'm trying to implement this idea into the visible function. Anyone do something like this?

1 ACCEPTED SOLUTION

Accepted Solutions

a.jpg

Mod will give you remainder. If remainder is 0 that mean is divisible by 100 and not error. If it is not zero then error.

You can customize this logic anyway you want

View solution in original post

5 REPLIES 5
Bilakanti
Responsive Resident
Responsive Resident

@asmith2  Can you send me the screenshot of what you are trying to achieve.

asmith2
Regular Visitor

PXL_20210604_053249714.jpg

So the value entered needs to be incremented by the specific amounts under it. So the value in Ones must be in increments of $1,000. If a user entered $1,200 they'd get an error because that's not a $1,000 increment. It would only accept $1,000 , $2,000 , etc.

a.jpg

Mod will give you remainder. If remainder is 0 that mean is divisible by 100 and not error. If it is not zero then error.

You can customize this logic anyway you want

View solution in original post

Hi @asmith2,

Do you means that you want to each Text input add increments based on the specific number?

Could you please share a bit more about the scenario?

I think the Mod() could achieve your needs.

I think you could set the OnChange property of each TextInput control as below:

If(
    Mod(
        Value(TextInput4.Text),
        1000
    ) <> 0,
    Notify(
        "Please incremented by the specific amounts!",
        NotificationType.Error
    )
)

Note that you could replace the 1000 within the Mod() function with another specific number as you expect.

Check if this could help you.

Regards,

Qi

Best Regards,
Qi
asmith2
Regular Visitor

Perfect, thank you!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,055)