Hello team,
I am stuck in sometime which i feel is easy but not working out for me. I am trying to create 2 tag folder using system.tag.configure function but i am unable to. Below is the image how i wanted and script which i tried.
in the image above i need to have recipe folder as well along with analysis folder.
type or paste code here
tagToBeAdded = "MC1"
siteSelected = "Pune"
areaSelected = "Dept"
lineSelected = "Non-IT"
getEnterprise = "Test1"
typeId_analysisSite = "SiteAnalysisStatus"
typeId_analysisArea = "AreaAnalysisStatus"
typeId_analysisLine = "AreaAnalysisStatus"
typeId_analysisMachine = "OEEAnalysis"
typeId_analysisMachineRecipe = "Recipe"
tagType = "UdtInstance"
print siteSelected
print areaSelected
print lineSelected
print tagToBeAdded
Tags={'tags' :
[
{
'name': siteSelected, # This section is to add Site Tag Folder
'tagType': 'Folder',
'tags' : [
{
'name': areaSelected, # This section is to add Site Tag Folder
'tagType': 'Folder',
'tags': [
{
'name': lineSelected,
'tagType': 'Folder',
'tags':[
{
'name': tagToBeAdded,
'tagType': 'Folder',
'tags' : [
{
'name': 'Recipe',
'tagType': 'Folder',
'tags': [{"name": 'udtRecipe',
"typeId" : typeId_analysisMachineRecipe,
"tagType" : tagType}],
'name': 'Analysis',
'tagType': 'Folder',
'tags': [{"name": 'udtAnalysis',
"typeId" : typeId_analysisMachine,
"tagType" : tagType}]
}
]
}
]
}
]
}
]
}
]
}
system.tag.configure(basePath = getEnterprise,
tags = Tags,
collisionPolicy = "o"
)