How to use "Use dynamic default" functionality (
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2022 03:59 AM
Hi All,
I would like to use "Use dynamic default" value functionality.
1) We have a field called "Connection strength" in Relationship Table. It has choices as
a) Always
b) Cluster
c) Infrequent
d) Occasional
2) Now based on condition example while creating relationships and type is contains :: conatains by in cmdb_rel_ci table ,I want to update "Connection strenth" field with "ingrequent". If type is uses :: used by, I want to update "connection strenth" as "Always".
Please let me for this requirement , how can I use "Use dynamic default" in field settings.
- Labels:
-
Discovery
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2022 04:26 AM
In the dictionary you can use calculated value
There you can write script
switch(current.type){
case "sys_id of type contains :: conatains by" : return "infrequent"; break;
case "sys_id of type uses :: used by" : return "always"; break;
case default: return "whatever default you want to set";
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2025 07:52 AM
No his question is about using the dynamic default functionality and not writing server scripts in the default value field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2022 11:12 PM
Did my response resolve your query? If yes please close this thread by marking my response as correct and helpful so that other readers can also benefit.
Otherwise let me know if you need more assistance.
Thanks and Regards,
Chandra Suvro Bose