# Augment on notification

**URL:** <https://dmap-community.ductus.global/t/augment-on-notification/1600>\
**Category:** YANG\
**Created:** [October 19, 2017, 1:37pm UTC](https://dmap-community.ductus.global/t/augment-on-notification/1600 "2017-10-19T13:37:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kackola](https://avatars.discourse-cdn.com/v4/letter/k/ccd318/32.png) [@Kackola](https://dmap-community.ductus.global/u/Kackola)\
**Post date:** [October 19, 2017, 1:37pm UTC](https://dmap-community.ductus.global/t/augment-on-notification/1600/1 "2017-10-19T13:37:29Z")

</div>

Hi,

Is it possible to define a generic notification in one yang model and the augment on more data conditionally?

the thing I’m trying to achieve is to have a leaf ref in the notification that references different parts of our yang models depending on some data in the notification.

I have

notification general-notification{  
leaf name {…}  
//some general data  
}

[//foo.yang](https://foo.yang)  
augment “general-notification”{  
when “name = ‘foo’”{  
leaf index{  
type leafref { path “somewhere/foo” }  
}  
// add more stuff?  
}  
}

[//bar.yang](https://bar.yang)  
augment “general-notification”{  
when “name = ‘bar’”{  
leaf index{  
type leafref { path “somewhereelse/bar” }  
}  
// add more stuff?  
}  
}

When I populate the data in the “struct confd\_cs\_node” I see the namespaces but I don’t know which one of the “index” noeds to populate.

Can I see the “when” condition in runtime soo I can populate the correct index node without duplicate the when logic in code?
