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
Power Participant
Power Participant

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
Power Participant
Power Participant

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.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,338)