Back to all

Querying Schema for a specific field

I wish to retrieve the SecAccess for a specific UDF. I appear to be able to query with key but that is a TypeID (/AbEntry/Udf/$TYPEID(25)) which is specific to a single db. I would like to query by the name or alias of the UDF, either "Region" or "Udf/$NAME(Company Profiling Info\Region)"

I have tried the below but get the following error returned:

{
  "Code": -4,
  "Msg": [
    {
      "Message": "Query: \"Name\" field doesn't support operator for \"Name $EQ \"Region\"\" [Maximizer.Model.Access.Sql]",
      "ErrorCode": -40002
    }
  ]
}
{  
    "Schema": {  
        "Scope": {  
            "Fields": {  
                "Key": 1,  
                "Alias": 1,  
                "Type": 1,  
                "Name": 1,  
                "Folder": 1,  
                "Attributes": 1,  
                "HasOption": 1,  
                "DisplayValue": 1,  
                "SecAccess": {  
                    "Read/DisplayValue": 1,  
                    "Write/DisplayValue": 1  
                }  
            }  
        },  
        "Criteria": {  
            "SearchQuery": {  
                "$AND":[  
                    {  
                        "Key": {  
                            "$TREE": "/AbEntry/Udf"  
                        },  
                        "Name": {  
                            "$EQ": "Region"  
                        }  
                    }  
                ]  
            }  
        }  
    },  
    "Compatibility": {  
        "SchemaObject": "1.0"  
    }  
}

Can you advice the correct query please.