The community will be in read-only from Tuesday 11:59pm (PST) to Wednesday 7:30am (PST)
The community will be in read-only from Tuesday 11:59pm (PST) to Wednesday 7:30am (PST)
Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Avoid to decrement a number variable

SOLVED
Go to solution
Highlighted
Claudia Tapia D
Regular Collector

Avoid to decrement a number variable

Hello, is there any way to avoid that anyone decrement a number type variable that is working as a counter? . I just want to have the possibility to increment the variable.

Thank you
2 REPLIES
Ruth Porter
Honored Contributor
Solution

Re: Avoid to decrement a number variable

Hi there,

The only way I can think of is to have a second number field that is hidden, say call it CounterCopy.

Have a DB rule which sets CounterCopy equal to the one you dont want decremented (Original) when the record is saved when Original has chnaged.

Have a UI rule triggered before Save when Original less than CounterCopy; do a user notification of type error to say decrement not allowed.

Hoep this helps, Ruth
http://www.teamultra.net
Nathan Brand
Super Collector

Re: Avoid to decrement a number variable

Hi
another way is to set on the role at the field that its view. and for the people that can change as write.
//Add this to "OnDomLoad" event