- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
10-22-2018 07:33 PM
Folks, looking forward for suggestions.
Variable in catalog item has some value, onChange of the field value, i should get the value and then append % to same field and getting error "Out of stack space function.
XXX
Solved! Go to Solution.
- Labels:
 - 
						
							
		
			Service Catalog
 
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
10-22-2018 07:51 PM
Hi,
Please share your script...
But it should look something like:
var step1 = newValue;
var step2 = step1 + "%";
g_form.setValue('field_name', step2);
Please mark reply as Helpful/Correct. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
10-22-2018 07:51 PM
Hi,
Please share your script...
But it should look something like:
var step1 = newValue;
var step2 = step1 + "%";
g_form.setValue('field_name', step2);
Please mark reply as Helpful/Correct. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
10-22-2018 09:09 PM
I think, you can try something like this.
function onChange(control, oldValue, newValue, isLoading) {
	if (isLoading || newValue == '') {
		return;
	}
	//Type appropriate comment here, and begin script below
	var val = newValue;
	var appended_val = val + "%";
	if(g_form.getValue('variable_name').indexOf('%') == -1)
		g_form.setValue('variable_name', appended_val);
}
					
				
			
			
				
			
			
				
			
			
			
			
			
			
		