Oct 30 2022 07:19 PM
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
Oct 31 2022 12:28 AM
@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.
Oct 31 2022 02:45 AM
@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?
Oct 31 2022 03:30 AM
@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.
Oct 31 2022 03:32 AM
@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.
Oct 31 2022 03:35 AM
Oct 31 2022 04:06 AM
@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.