- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2022 12:40 AM
I want to use a mapping kind of thing
and store this in system property and use it in my script include to make tablename,parentfield and column name dynamic how can i achieve this
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2022 01:28 AM
Just create a property with below values
{ "task" :{"refField": "parent", "qField" : "number" }, "incident" :{"refField": "parent_incident", "qField" : "number" }, "sys_user" :{"refField": "manager", "qField" : "name" }, "problem" :{"refField": "duplicate_of", "qField" : "number" }}
call that property
var tableName = gs.getProperty('property name'); //another property which stores tablename
var propV = gs.getProperty('property_name');
var propObj = JSON.parse(propV);
Now you can use it :
propObj[tableName ].refField and propObj[tableName ].qField
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2022 04:20 AM