Hi,
I have a requirement where i want to assign a <Dummy> domain to all the data items which have <undefined> data type and <undefined> domain; in a conceptual data model (CDM)
The number of such fields is huge, hence would prefer doing this via a script in one of the extensions.
Can someone please help me with the code. I have the below code which seems to be not working:
Sub %Method%(obj)
' (here) obj = conceptual data model
dim data_item, dummy_domain, assign_domain, e
assign_domain = "Dummy"
' loop over all data items in the model
for each data_item in obj.dataitems
for each dummy_domain in obj.domains
if data_item.dataType = "" and dummy_domain.name = "" then
dummy_domain.SetNameAndCode assign_domain, assign_domain
end if
next
next
output "Done!!!"
End Sub