Announcing the Global SNUG Board of Directors. Learn more here
‎07-27-2016 12:12 AM
Hi All,
What is the practical use of display business rule, can someone please give a pratical example
Thanks,
Abhinab
Solved! Go to Solution.
‎07-27-2016 12:33 AM
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 ..
‎07-27-2016 12:33 AM
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 ..
‎04-03-2017 03:34 AM
okay that was by me :d Thanks for sharing !
‎07-27-2016 12:36 AM
Hi Abhinab,
Find below referenced which elaborate effective use of Display Br.
A Better "Best Practice" Client Script
Mini-Lab: A Display Business Rule Demonstration
g_scratchpad vs. GlideAjax: is there really a winner?
‎07-27-2016 02:21 AM
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.