Formatting for Visible

Copper Contributor

I am having trouble getting the formatting correct.  I have a "choice" field in a list on sharepoint.  I am trying to make an "if" statement that looks at that field such as:

 

If(ThisItem.'RequestType'="Commission Invoice", true, false)

 

but it's giving me an error (I believe because the RequestType field is a choice field, not text?  Any suggestions? THank you

6 Replies

@adamsellsnj Use below formula for Visible property in Power apps: 

 

If(ThisItem.'RequestType'.Value = "Commission Invoice", true, false)

 


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

@ganeshsanap thank you. If I want to embed another if statement in there, so 2 pieces of criteria have to be met to be true, or it’ll show fake, how would I. Do that?

 

@adamsellsnj You can use AND, OR functions or similar operators to combine multiple conditions in formula.

Check documentation: And, Or, and Not functions in Power Apps 


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

@adamsellsnj For example: 

 

If(ThisItem.'RequestType'.Value = "Commission Invoice" && ThisItem.Title = "Item 1", true, false)

 

This will return true only when both condition 1 AND condition 2 are true. 


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

Thank you! I can use this for the value from a choice as well? Does it have to be a text column?

@adamsellsnj You can use AND/OR for any column types.

 

Inside single condition, formula depends on your column type and column settings. You have to use .Value like (ThisItem.'RequestType'.Value) to get the actual text value of single selection choice column. But for text columns, you can directly use column name to compare like (ThisItem.Title).


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.