locked
Using EntityMembersAttributesGet results in null Content for FileAttribute and Free-Form Numeric Attributes are changed to "String" type RRS feed

  • General discussion

  • I have used EntityMemberAttributesGet to get FileAttribute from MDS as follows


    public MDS.EntityMembers ReadFileAttributeForMember(MDS.EntityMembers m)
    {
    MDS.EntityMemberAttributesGetRequest getRequest = new MDS.EntityMemberAttributesGetRequest();
    MDS.EntityMemberAttributesGetResponse getResponse;

    getRequest.EntityMembers = m;
    getRequest.International = new MDS.International() { Locale = "en-US" };

    getResponse = MDSProxy.MDSClient.EntityMemberAttributesGet(getRequest);

    return getResponse.EntityMembers;
    }

     

    At this point input parameter for above procedure (MDS.EntityMembers m) has all members for which I have to get File Attribute from MDM and input parameter members have values for all other attributes (i.e. Free-Form string/numeric and Domain-based)

     

    But after giving call to EntityMemberAttributesGet free-form number based attributes get string type values (i.e say 1000.00 gets converted to “1000.00”)

    And returns files attributes with no value in Content property but type correctly set as “File Attribute”

     


     Immediat-window gives result as follows

    Input Parameter Members:

    ? m.Members[0].Attributes[2]
    {MDSLib.MDService.Attribute}
        ExtensionData: {System.Runtime.Serialization.ExtensionDataObject}
        extensionDataField: {System.Runtime.Serialization.ExtensionDataObject}
        Identifier: {MDSLib.MDService.Identifier}
        IdentifierField: {MDSLib.MDService.Identifier}
        PropertyChanged: null
        Type: File
        TypeField: File
        Value: null
        ValueField: null
    ? m.Members[0].Attributes[1]
    {MDSLib.MDService.Attribute}
        ExtensionData: {System.Runtime.Serialization.ExtensionDataObject}
        extensionDataField: {System.Runtime.Serialization.ExtensionDataObject}
        Identifier: {MDSLib.MDService.Identifier}
        IdentifierField: {MDSLib.MDService.Identifier}
        PropertyChanged: null
        Type: Number
        TypeField: Number
        Value: 1000.0
        ValueField: 1000.0Response of EntityMemberAttributesGet  gives

    ?getResponse.EntityMembers.Members[2]
    {MDSLib.MDService.Member}
        Attributes: Count = 3
        AttributesField: Count = 3
        AuditInfo: {MDSLib.MDService.AuditInfo}
        AuditInfoField: {MDSLib.MDService.AuditInfo}
        Collections: Count = 0
        CollectionsField: Count = 0
        ExtensionData: {System.Runtime.Serialization.ExtensionDataObject}
        extensionDataField: {System.Runtime.Serialization.ExtensionDataObject}
        MemberId: {MDSLib.MDService.MemberIdentifier}
        MemberIdField: {MDSLib.MDService.MemberIdentifier}
        Parents: Count = 0
        ParentsField: Count = 0
        PropertyChanged: null
        SecurityPermission: null
        SecurityPermissionField: null
        ValidationStatus: NewAwaitingValidation
        ValidationStatusField: NewAwaitingValidation
    ?getResponse.EntityMembers.Members[0].Attributes[2]
    {MDSLib.MDService.Attribute}
        ExtensionData: {System.Runtime.Serialization.ExtensionDataObject}
        extensionDataField: {System.Runtime.Serialization.ExtensionDataObject}
        Identifier: {MDSLib.MDService.Identifier}
        IdentifierField: {MDSLib.MDService.Identifier}
        PropertyChanged: null
        Type: File
        TypeField: File
        Value: {MDSLib.MDService.FileAttribute}
        ValueField: {MDSLib.MDService.FileAttribute}
    ?getResponse.EntityMembers.Members[0].Attributes[2].Value
    {MDSLib.MDService.FileAttribute}
        Content: null
        ContentField: null
        ContentType: null
        ContentTypeField: null
        ExtensionData: {System.Runtime.Serialization.ExtensionDataObject}
        extensionDataField: {System.Runtime.Serialization.ExtensionDataObject}
        Name: null
        NameField: null
        PropertyChanged: null
    ?getResponse.EntityMembers.Members[0].Attributes[1]
    {MDSLib.MDService.Attribute}
        ExtensionData: {System.Runtime.Serialization.ExtensionDataObject}
        extensionDataField: {System.Runtime.Serialization.ExtensionDataObject}
        Identifier: {MDSLib.MDService.Identifier}
        IdentifierField: {MDSLib.MDService.Identifier}
        PropertyChanged: null
        Type: String
        TypeField: String
        Value: "1000.00"
        ValueField: "1000.00"

    As you can see Response turn numeric attributes to string type and no "Content" for FileAttribute.

    Please suggest where I am going wrong?

    Thanks

    PRASAD NADKARNI

     

    Tuesday, August 2, 2011 4:19 AM

All replies