Announcing the Global SNUG Board of Directors. Learn more here

Help
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

example use of display business rule

Abhinab Achary1
Tera Expert

Hi All,

What is the practical use of display business rule, can someone please give a pratical example

Thanks,

Abhinab

1 ACCEPTED SOLUTION

Deepa Srivastav
Kilo Sage

Hi,



I saw this example in the Community sometime back which I found good to explain BR concept. Check this out.



Mark Correct if it solved your issue or hit Like and Helpful if you find my response worthy.


Thanks,
Deepa



Let's say you are posting a question on community and community is your service now instance



First, I need to check that you not posting
any offensive materials. I can have a before rule to check that. According to
the rules setup by me, either allow or disallow the posting of the question
(Transaction).



Second, after you have passed the rules of
posting and posted the question successfully. Someone opens up your question
and likes your question. I need to award you points once the like is
successful. I can have a after business rule to set this up.



Third, you will need to get email trigger
when someone comments on your question. It does not need to be immediate. I can
have a async rule to trigger the email.



Finally, I need to update the number of views
of your question. I can have a display business rule to update the counter
related to your question ..


View solution in original post

7 REPLIES 7

Deepa Srivastav
Kilo Sage

Hi,



I saw this example in the Community sometime back which I found good to explain BR concept. Check this out.



Mark Correct if it solved your issue or hit Like and Helpful if you find my response worthy.


Thanks,
Deepa



Let's say you are posting a question on community and community is your service now instance



First, I need to check that you not posting
any offensive materials. I can have a before rule to check that. According to
the rules setup by me, either allow or disallow the posting of the question
(Transaction).



Second, after you have passed the rules of
posting and posted the question successfully. Someone opens up your question
and likes your question. I need to award you points once the like is
successful. I can have a after business rule to set this up.



Third, you will need to get email trigger
when someone comments on your question. It does not need to be immediate. I can
have a async rule to trigger the email.



Finally, I need to update the number of views
of your question. I can have a display business rule to update the counter
related to your question ..


okay that was by me :d Thanks for sharing !


harshvardhan_11
Mega Expert

Another practical example is when showing record producer variables in record, and hiding the empty variables.



You can refer to article


Hide Empty Variables on a Standard Form - ServiceNow Guru



Quoting from article


the key to making this work is a 'display' business rule. The business rule runs before the display of any record in the table (tasks in this case) and queries the 'sc_item_option_mtom' and 'question_answer' tables to collect any variable names for empty variables. Then it passes this information in the 'g_scratchpad' object to the client to hide the variables on the form.