cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Pskhaz
Frequent Visitor

Based on toggle , the value should change in powerapps form text field

default toggle will be "Single" and user will be adding the value in dcode field

 

Pskhaz_0-1648815001858.png

 

Now when user clicks on toggle, the value should be multiplied by 4. i.e. here it should show 200.  [50*4], value should be changing based on toggle selection .

is it possible to multiple the  datacard entered value by 4 based on toggle selection?

 

Pskhaz_1-1648815150780.png

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
BrianS
Super User
Super User

Does the user need to see the amount change, or does it just need to be saved in your data with the adjusted value?

View solution in original post

EdViegas
Resolver IV
Resolver IV

Try this:

 

1. Set de Default property of Dcode as VarDcodeDefault

2. Set Reset as VarFieldReset

3. Set OnChange property of Toggle: 

 

 

UpdateContext(
    {
        VarDcodeDefault: If(
            Self.Value = true,
            Value(DataCardValueN.Text) * 4,
            Value(DataCardValueN.Text)
        )
    }
);

 

 

Edit: is not necesary Reset field

 

View solution in original post

2 REPLIES 2
BrianS
Super User
Super User

Does the user need to see the amount change, or does it just need to be saved in your data with the adjusted value?

EdViegas
Resolver IV
Resolver IV

Try this:

 

1. Set de Default property of Dcode as VarDcodeDefault

2. Set Reset as VarFieldReset

3. Set OnChange property of Toggle: 

 

 

UpdateContext(
    {
        VarDcodeDefault: If(
            Self.Value = true,
            Value(DataCardValueN.Text) * 4,
            Value(DataCardValueN.Text)
        )
    }
);

 

 

Edit: is not necesary Reset field

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (2,085)