This content has been marked as final. Show 3 replies
> cfif IsDefined("Row .MTD_TypeTotal")
Which version of CF are you running?
1) you cannot do it in one hit.
2) you need to first establish whether Row exists.
3) contingent on the answer to (2), you need to check if Row has a key
(2) is easy in CF8, as there's an array function to test for such things.
It's not so easy in CF7 or earlier, but if you search around these forums
or Google, you'll come up with some options.
(3) is covered by a struct function.
In dealing with issues like this, it'ds always handy to check the docs
before asking the question: you'll learn more if you try to DIY.
If Row is always a structure, try using structKeyExists
<cfif StructKeyExists(Row, "MTD_TypeTotal")>
If not, try adding IsStruct
<cfif IsStruct(Row ) AND StructKeyExists(Row, "MTD_TypeTotal")>
Adam, thanks. I'm devloping in 7 and posting to different servers, the lowest has 7.
The StructKeyExists was the short answer, but I've followed your livedoc links which were both good resources.