I want to utilize Microsoft Graph to recreate this more advanced IF function we have. Basically if A1's value is empty, we use B1's value, if not, we do a calculation.
=IF(A1="", B1, (B1*C1*D1))
This is the documentation for the if function
What I'm worried about is
Can we even use an expression in the logicalTest parameter? Looking at the documentation, looks like you have only have a predefined types and is not possible.
Can we do a calculation in the valueIfFalse parameter? Again looks like you cannot.
My only out of the box idea right now is to utilize the Excel.FunctionResult as an option for both. Like if I could nest 2 functions inside the if function (1st being the .isNumber() to check if empty or not, and 2nd be .product()).
This is my first Microsoft Graph function so very new to the tips & tricks. If anyone has any ideas, I'd really appreciate it! Thank you!!
I was able to do a basic IF function but not able to add expressions for the logicalTest parameter and can't add in a expression in the valueIfFalse parameter.
You can use an expression in the logicalTest parameter as long as the expression results in something that can be interpreted as 'True' or 'False'.
You can absolutely have an expression for the valueiffalse parameter or the valueiftrue parameter. You can even place another IF function in either parameter if you have more than two possible outcomes.