cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Shahin1
Helper I
Helper I

If code with dropdown

I have a drop_down with text values abc and xyz. If I select abc then value(which is a number) in textInput1 shoud get value of texInput2(which is also a number) else textInput1 should get value of textInput2 mutiplied with 0.5 that is textInput2*0.5

 

I tried with function as default at textInput1 as

If(Drop_down.Selected.Value = "abc", textInput2, textInput2*0.5)

 

I am getting error ... Can someone help me with corrcet syntax?

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
zmorek
Super User
Super User

Try:
If(Drop_down.Selected.Value = "abc", textInput2.text, textInput2.text*0.5)

 

You might need Value(textInput2.Text*05) if you still get errors.

View solution in original post

Liam_Chapman
Resolver II
Resolver II

Hi @Shahin1 ,

 

Try

If(Drop_down.Selected.Value = "abc", textInput2.Text, Value(textInput2.Text)*0.5)

Liam_Chapman_0-1622811836620.png

 



Cheers,
Liam.

View solution in original post

2 REPLIES 2
zmorek
Super User
Super User

Try:
If(Drop_down.Selected.Value = "abc", textInput2.text, textInput2.text*0.5)

 

You might need Value(textInput2.Text*05) if you still get errors.

View solution in original post

Liam_Chapman
Resolver II
Resolver II

Hi @Shahin1 ,

 

Try

If(Drop_down.Selected.Value = "abc", textInput2.Text, Value(textInput2.Text)*0.5)

Liam_Chapman_0-1622811836620.png

 



Cheers,
Liam.

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

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.

Top Solution Authors
Top Kudoed Authors
Users online (1,485)