How to create system property that simplifies code and use in Business rule?

Deepika61
Tera Contributor

Hi all,

Actually in time sheet we have tasks , to display those tasks we have to mention tables in the below

 

 

Deepika61_1-1704950770867.png

once we added our required table here , it will display on the tasks list ,once it is available , there is one custom BR is there checking here also

Deepika61_2-1704951235153.png

now the concern was like whenever we want another task to task list in time sheet we need to change these two places 

so now i want to create one system property that combines these two things and need to used in , because of that instead of changing two places , simply we can update system property

 

Please help me to achieve this

Thanks

Deepika

7 REPLIES 7

@Deepika61 

property should hold value like this -> dmn_demand,kb_feedback_task

once you create that system property then update the condition as this

gs.getProperty('task_selector').indexOf(current.task.sys_class_name) == -1

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar 

Thanks for the code,

Actually this is for BR, but i have to add one more thing to the property 

Deepika61_0-1704975028767.png

this is the instance where the tables are added for the tasks which are display under tasks in time sheet, so this also need to include in the property as well

 

Thanks

Deepika

 

@Deepika61 

there you cannot use system property

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader