- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-17-2019 11:07 PM
Hi All,
I want to display error when he is entering the value more than 10 in the field. Through client script it is working fine but using business rule i want to show error message in the portal.
IP Range is the field where i am actually trying for this.
Could you please help me on this,
Thank You,
Sai.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-17-2019 11:20 PM
sample code catalog client script:
var ab = g_form.getValue('ip_range'); // make sure the variable name
if(ab > 10 ){
g_form.addErrorMessage('This is an error');
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-17-2019 11:12 PM
use your script in catalog client script , business rules run on table and you are using here catalog form so you wont be able to apply your business rule on catalog form.
so just use catalog client script with the code which you have written in your business rule.
use g_form.getValue('variable name'); to get the variable value.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-17-2019 11:19 PM
Hi
This won't be possible because business rules run on table. What you can do is, you can put an alert from the client script, or you can write the code which is in the BR into your widget server script and give a message by gs.addInfoMessage.
Hope this helps.
Regards,
Omkar Mone

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-17-2019 11:20 PM
sample code catalog client script:
var ab = g_form.getValue('ip_range'); // make sure the variable name
if(ab > 10 ){
g_form.addErrorMessage('This is an error');
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-18-2019 12:09 AM
Hi Harsha,
Thank You not its now its working.