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
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!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

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