I'm trying to write up an if statement to check if OptionSet value is 0. If true then it needs to do the calculations, if not do another calculation.
I've written an if statement on a MaskedEdit as follows:
if ( [//methodUltraOptionSet] = 0, ([//PL1SubTotalText] * [//percent01UltraMaskedEdit] %), ([//PL1SubTotalText] * [//percent01UltraMaskedEdit] %))
I get an error object to set to an instance of an object.
I obviously have this formula wrong. Any guidance would be appreciated!
Thanks!
Hello Logan,
Thank you for posting on our forums.
I have tested the provided formula and it is working as expected on my side( although the statement is the same on both sides of the condition).
Maybe you can provide some sample which is causing the error?
See attached sample that I've used to test the formula.
Looking forward to your reply.
Sincerely,Tihomir TonevAssociate Software DeveloperInfragistics
CalcManagerFormulaSample.zip
HI Tihomir,
Thanks for the update. I was looking at the sample and while looking at the coding it triggered me to go look at whether I set the TreatAsType...which I did. That's where I went wrong. I feel all kinds of stupid now. I just removed the TreatAsType for each of the controls and it worked perfectly.