Prev: Report Pro 2.16.. export PDF from selected pages, drop
Next: Urgent Direct client rek:Dot Net developer required in Dover,DE
From: Hollywood_t on 1 Jul 2010 09:30 I am using the following code which works fine except when the 'NamedItem' does not exist. For some reason, the XML I am retrieving does not have a consistent number of fields in each node. I know I can work around this by looping through all of the attributes and matching the NodeNames with the FieldNames I need, however, maybe someone can tell me how to compare VB's NOTHING in CAVO. oXMLFields:Attributes:getNamedItem( "CustomerPhone2" ):NodeTypedValue In VB you can assign oXMLFields:Attributes:getNamedItem( "CustomerPhone2" ) to an object variable and then check if it is equal to "NOTHING" before using any of the objects attributes. Thanks Nick
From: Hollywood_t on 1 Jul 2010 23:43
Have resolved the problem by interogating the object. Invalid objects have different values to valid ones. Modified the function listed below which is found in the CAVO Help File FUNCTION OOpsCheck(uObject) AS LOGIC LOCAL lSuccess AS LOGIC LOCAL aObject AS ARRAY lSuccess := IsObject(uObject) IF lSuccess // Display object contents aObject := Object2Array(uObject) FOR i := UPTO ALen(aObject) QOut(aObject[i]) NEXT ELSE ? "Object is required" ENDIF RETURN lSuccess Nick |