
tiagomacul
Giga Sage
Options
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 10-16-2018 11:01 AM
How to create a number type field as a variable in a catalog item?
Como criar variável somente números no catálogo?
01.
Navigate > Service Catalog > Variables Sets
02.
Select your variable set / Selecione o Variable set desejado
03.
Click New / Clique em "New"
04.
Name: Type your own name
Type: Select "onChange"
variable name: Select your own variable
05.
On script field copy and paste
function onChange(control, oldValue, newValue, isLoading) {
if(isLoading || newValue == ''){
return;
}
var pattern = /^[0-9]*$/;
if(!pattern.test(newValue)){
//alert('Please enter only numbers!');
alert('Por favor informe apenas números no centro de custo!');
g_form.setValue('centro_custo', '');
}
}
.
Labels:
- 726 Views