I am writing a generic component that I want to use across the Power Apps I build. I would like to set default values for these properties but in order to do that I need to know if the properties are empty. For certain properties it is straight-forward, like strings. But for others, not so much. For example, I have several properties of type Color. I want to know if a Color property was provided. How can I do that? IsEmpty(), IsBlank() and IsError() all return false.
Thoughts?
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Solved! Go to Solution.
When you create a component, you always need to set the default values for the properties of the component.
So, if for example, you set a property with a default property of Red color, then you can always check to see if the value is still Red - if not, then it has been changed.
I hope this is helpful for you.
When you create a component, you always need to set the default values for the properties of the component.
So, if for example, you set a property with a default property of Red color, then you can always check to see if the value is still Red - if not, then it has been changed.
I hope this is helpful for you.
IsBlank(inputParam) does work, but you can also use IsBlankOrError to account for erroneous scenarios as well.
Keep in mind, when working with components:
For example, in the component editor
On a screen, with a value set
On a screen, with no value set
User | Count |
---|---|
254 | |
106 | |
92 | |
47 | |
37 |