Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
nwSearchFilter('','BASECLS','',0,0,0) nwSearchFilter('','ANAME','User',0,0,0) nwSearchFilter('','AND','',0,0,0) nwSearchFilter('','ANAME','Surname',0,0,0) nwSearchFilter('','EQ','',0,0,0) nwSearchFilter('','AVAL','Smith',0,0,0) nwSearchFilter('','END','',0,0,0)I modify the searchfilter to change 'Surname' to 'DirXML-Associations' and 'Smith' to a specific object GUID. The format of the DirXML-Associations attribute would be similar to the following:
CN=DirXMLtoBogus.CN=cTestDM001-Driver001.OU=DirXML\{CF1A2319-36E9-1448-ABB9-DCCBC56F39B2}So, the filter I came up with is:
nwSearchFilter('','BASECLS','',0,0,0) nwSearchFilter('','ANAME','User',0,0,0) nwSearchFilter('','AND','',0,0,0) nwSearchFilter('','ANAME','DirXML-Associations',0,0,0) nwSearchFilter('','EQ','',0,0,0) nwSearchFilter('','AVAL','{CF1A2319-36E9-1448-ABB9-DCCBC56F39B2}',0,0,0) nwSearchFilter('','END','',0,0,0)My understanding from the documentation is that EQ would be valid here because:
"In the case of testing equality where the attribute is multi-valued, then the equality test result will be TRUE if the specified value is present in the attribute's list of values"
However, the error I receive is:
298: NetWareX Extended: Ill-formed attribute on line: nwSearchFilter('','AVAL','{CF1A2319-36E9-1448-ABB9-DCCBC56F39B2}',0,0,0)I must be missing something, so any direction you can provide would be appreciated.
SYN_PATH "namespacetype|volumeobject|path"I don't have a test server available right at this moment with DirXML installed on it, so I can't readily examine an actual instance of this attribute to determine what numeric value would be used for the "namespacetype" field in the compound value for this attribute.
The best bet is to use nwGetObjValue() to retrieve the values for this attribute on one or more objects so that you can directly observe the values. That will show you the field values for the compound attribute value as well as the formatting of the value.
Additional information....
This is a multi-valued attribute, so objects can have associations with multiple DirXML drivers. However, an object cannot have multiple associations with a single driver.
The Path syntax contains three fields. DirXML uses the volume field to hold distinguished name of the DirXML driver. The name space (integer) field holds the state of the association. The path field (string) contains a identifier used by the external application that uniquely identifies an object in that application.
Since all object in the eDirectory database inherit from Top, all objects have the potential for an association with an object in an external application.
cn=DirXMLtoBogus,cn=tBogus001-DriverSet001,ou=DirXML,o=Services#1#{4E626EBD-9CCB-d846-77CE-A83AA76CE401} cn=DirXMLtoBogus,cn=tBogus001-DriverSet001,ou=DirXML,o=Services|1|{4E626EBD-9CCB-d846-77CE-A83AA76CE401} 1#cn=DirXMLtoBogus,cn=tBogus001-DriverSet001,ou=DirXML,o=Services#{4E626EBD-9CCB-d846-77CE-A83AA76CE401} 1|cn=DirXMLtoBogus,cn=tBogus001-DriverSet001,ou=DirXML,o=Services|{4E626EBD-9CCB-d846-77CE-A83AA76CE401}I also tried al of the above combinations replacing the commas with periods.
Then, I tried using nwgetobjvalue() to see what it would show for DirXML-Associations and it lists it in this format:
cn=DirXMLtoBogus.cn=tBogus001-DriverSet001.ou=DirXML\{4E626EBD-9CCB-d846-77CE-A83AA76CE401}So, I tried several combinations replacing the slash with # and |, and also replacing the periods with commas, but no luck.
Any other suggestions? Or, any other way to search for a user object with a DirXML-Associations attribute equaling a specific value other than using nwsearchfilter?
From the NDK [Novell Developer Kit] web site:
We get the following additional information:
This is a multi-valued attribute, so objects can have associations with multiple DirXML drivers. However, an object cannot have multiple associations with a single driver.
The Path syntax contains three fields. DirXML uses the volume field to hold distinguished name of the DirXML driver. The name space (integer) field holds the state of the association. The path field (string) contains a identifier used by the external application that uniquely identifies an object in that application.
Since all object in the eDirectory database inherit from Top, all objects have the potential for an association with an object in an external application.
When you used nwGetObjValue() to retrieve the values for the "DirXML-Associations" attribute on a specific object, what value did you pass in for the Flag parameter? I suspect that you passed in zero (0) instead of one (1). This resulted in the attribute value being returned in the legacy format used by on of the n4*() functions in the older N4 extender. Pass in a value of one (1) and then you will see the return value format will be what is documented for the SYN_PATH syntax, and the value will contain all 3 fields formatted properly.
Maybe the nwGetObjValue() documentation needs to be updated to clearly call out the siginificance of the attribute value format flag, as a value of one (1) is required to obtain a value that is properly formatted and which can be passed in as a parameter value to other functions like nwSearchFilter() and nwModifyObject().
Your example values obtained via LDAP show a value of "1" for the namespacetype field in the attribute value. Taking that along with the volumeobject & path field values from the other examples, I think that the following value should work. Please note that DN values should have a leading dot "." on them if your current context is not set to "[Root]" via nwSetContext() in your script, and that delimiter in object names is a dot "." [NDAP], not a comma "," [LDAP], when using the NetWareX extender.
"1|.cn=DirXMLtoBogus.cn=tBogus001-DriverSet001.ou=DirXML.o=Services|{4E626EBD-9CCB-d846-77CE-A83AA76CE401}"
Your suggestion solved my filter issue. Thanks for the quick responses and for the lesson in SYN_PATH formatting.
Article ID: W16544
File Created: 2005:02:18:12:21:22
Last Updated: 2005:02:18:12:21:22