Restrict user to fill 2 Decimal value in the Field on the Incident Form.

Insider
Giga Guru

Hello Everyone,

 

I need help on 2 issues.

 

1: Restrict user to fill only 2 Decimal values on a field on the INC form. Ex: 12.34

I have used a decimal Type field, but this works only when i save the record, but i want the system to restrict the user before saving the form itself 

I did this on a variable using the On Change client script for portal, but not able to achieve this on Field for a table. Please help

 

2: When a child case is opened, make the opened date of the child case to be the current date.

When a child case is closed, make the closed date of the child case to be the current date.

** Child case is being creating using a UI Action.

**

1 ACCEPTED SOLUTION

Hi @Insider 

The JavaScript RangeError: Maximum call stack size exceeded happens when a function keeps calling itself without any condition to stop, and eventually, the program runs out of space to keep track of these repeated calls. It's a sign that your program needs a way to stop the function from calling itself endlessly

try the following extended version in the first part

if (isLoading || newValue === '' || newValue == oldValue) {
return;
}

View solution in original post

7 REPLIES 7

Hello.

Thanks a lot for the quick reply.

I am facing issue here.

1: When i round off value i get an error

error: onChange script error: RangeError: Maximum call stack size exceeded function () { [native code] }

 

Hi @Insider 

The JavaScript RangeError: Maximum call stack size exceeded happens when a function keeps calling itself without any condition to stop, and eventually, the program runs out of space to keep track of these repeated calls. It's a sign that your program needs a way to stop the function from calling itself endlessly

try the following extended version in the first part

if (isLoading || newValue === '' || newValue == oldValue) {
return;
}

zwsite
Tera Contributor

Thanks a lot.