I am having an issue where an icon is not being displayed when first loading the app because the variable has not been initialised. I tried to get around this by having an IsBlank or IsBlankOrError function along with an If statement, but it keeps coming up with the error. The error is specifically:
Incompatible types for comparison. These types can't be compared: Text, Number.
I previously has the variable set to a Boolean and I still received the same error (e.g., "Text, Boolean").
The function is: If(IsBlankOrError(Help=0), true, Help=0). Since Help does not have a value, I am getting an error at Help=0 (both). I tried to get around this by the IsBlankOrError part which does not seem to see that Help=0 is an error. Previously, I had If(IsBlank(Help), true, Help=0). This still had an issue with the latter Help=0 - even though it would not need to evaluate that section due to the IsBlank(Help) which would then be true.
I hope this makes sense. Any assistance would be great.
Solved! Go to Solution.
Hey @J_Taylor
Just a few ideas to start with would it help if the variable was initialised onstart and set to 0?
Also is help being set to text at anypoint does Help = "0"
with the quotes make the error disappear?
How is Help being Set :)?
If that does not fit your needs
Signature:
If you appreciated my comments/responses please be sure to Like/Kudo them it really does make me smile 🙂 !
Link to the Power Platform Professionals United Kingdom User Group:
To set it on start
First find the App and click on it it will be above the first screen:
then when you click it change the property to onstart:
as it usually shows startscreen
then inside of here set the variable:
whenever the app starts it will now set it.
as you are in edit mode make sure you run onstart to initialize the variable for you:
so click three dots and run onstart
Signature:
If you appreciated my comments/responses please be sure to Like/Kudo them it really does make me smile 🙂 !
Link to the Power Platform Professionals United Kingdom User Group:
Hey @J_Taylor
Just a few ideas to start with would it help if the variable was initialised onstart and set to 0?
Also is help being set to text at anypoint does Help = "0"
with the quotes make the error disappear?
How is Help being Set :)?
If that does not fit your needs
Signature:
If you appreciated my comments/responses please be sure to Like/Kudo them it really does make me smile 🙂 !
Link to the Power Platform Professionals United Kingdom User Group:
Thanks for the ideas, @AJ_Z.
I tried setting Help to text "On" and "Off" [Set(Help,"On")]. I don't get an error anymore. However, it does not display on startup. The code is: If(IsBlank(Help), true, Help="Off") - which is equal to true at the start. However, it still seems to be invisible.
How does one set Help to a value on start?
To set it on start
First find the App and click on it it will be above the first screen:
then when you click it change the property to onstart:
as it usually shows startscreen
then inside of here set the variable:
whenever the app starts it will now set it.
as you are in edit mode make sure you run onstart to initialize the variable for you:
so click three dots and run onstart
Signature:
If you appreciated my comments/responses please be sure to Like/Kudo them it really does make me smile 🙂 !
Link to the Power Platform Professionals United Kingdom User Group:
Thanks, @AJ_Z.
I was able to set Help as false from the beginning which made everything much easier. Thank you for the OnStart idea to bypass the whole issue.