This method returns the segment which has a specific attribute (name/value)
Get segment by attribute (e.g. because the index of target segment is unknown)
- Parameters
-
fullPath | unique full address to parent segment |
filterAttributeName | filter by attribute name |
filterAttributeValue | filter by attribute value |
filterAttributeDefaultValue | (optional) alternative filter by attribute value (second chance) |
1 set res [$idocObj getFilteredAttributes "MATMAS05/IDOC:1/E1MARAM:1/E1MAKTM" "SPRAS_ISO" "EN"]
5 set res [$idocObj getFilteredAttributes "MATMAS05/IDOC:1/E1MARAM:1/E1MAKTM" "SPRAS_ISO" "NOT_FOUND" "EN"]
- Warning
- An error will be thrown if the parent segment cannot be found
-
An error will be thrown if the target segment had no attribute with the following properties:
- name := $filterAttributeName
- value := $filterAttributeValue or $filterAttributeDefaultValue (if specified)
- Returns
- segment attributes as Tcl Dict