cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tim88
Level: Powered On

Invalid Argument Type - If function

Formula im struggling with on a Visible Property on a Label


If(DataCardValue27.SelectedText = "Yes", true, false)

 

On a Drop Down box with ["Yes","No","N/A"] in its Items Property. 

 

Goal is to have the label visible toggle to True if the dropdown box is set to yes. 

 

Annotation 2020-01-20 151459.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: Invalid Argument Type - If function

Hi @Tim88 

 

You are getting this error because, to get the selected value from a Combobox control, you need to use the expression as:

If(DataCardValue27.Selected.Value = "Yes", true, false)

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

3 REPLIES 3
Dual Super User
Dual Super User

Re: Invalid Argument Type - If function

Hi @Tim88 

 

You are getting this error because, to get the selected value from a Combobox control, you need to use the expression as:

If(DataCardValue27.Selected.Value = "Yes", true, false)

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Tim88
Level: Powered On

Re: Invalid Argument Type - If function

Thanks @yashag2255 , that did the trick, any tips on what i can look for in the future that would help me self-diagnose the invalid syntax other than just knowing? 🙂 

Dual Super User
Dual Super User

Re: Invalid Argument Type - If function

Hey @Tim88 

 

I would highly recommend to try to play around with the different kinds of control in PowerApps studio and check their properties. Once you understand the process, you will be able to figure it yourself. And if not, feel free to post here on the forum. 

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

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