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.

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.

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

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.

Users online (2,088)