Add new field to Attribute form & export Attribute fields
説明
It is possible to add a new field in Attribute form? For example to flag attributes as 'confidential'. The idea is to add a new checkbox field in 'Attribute Properties' form that indicates if this field is confidential or not.
After that, I would like to know which are the confidential fields with a report and export these values in a file to be able to mask these fields with an external tool.
対策
It is possible to create a new field (e.g. checkbox) in the Attribute form. The way to do it is the same as in the User Guide but instead of an entity, you have to select attributes. Find below a sample script that exports a list of the attributes checked as confidential. Once the customization is done and the new property is added, you can open the scripting windows, select the relevant model, and use the following script.
Script: function main() { var i, Entity, Attribute, text; var fso = new ActiveXObject("Scripting.FileSystemObject"); var file = fso.OpenTextFile("C:/temp/Log.txt", 8, true); for (i=0; i { Entity = Model.Entities.GetObject(i); for (j=0; j { Attribute = Entity.Attributes.GetObject(j); if (Attribute.Confidential) { text = Entity.Name+"."+Attribute.Name+" is confidential"; Log.Information(text); file.WriteLine(text); } } } file.Close(); }