Not able to to call getDisplayBox

AnketA
Tera Contributor

Hello,

 

I am trying to use getDispalyBox methods try to call it using object g_form but its not showing in my PDI could anyone please help
 
The only method starting from 'D' getting suggestion is "getDecimalValue()"
Using washington Dc version
 
Thanks in advance
 
 
1 ACCEPTED SOLUTION

@AnketA : You can type method name  as  "g_form.getDisplayBox('your variable name').value;"  in your code.  From my experience, there are many such cases like some undocumented methods in search however they are working as per backend configuration.  So I would suggest that type method name in your code even though it is not available in search and check if works as per your requirement. 

Hope it helps.

Please mark my answer as helpful/accepted if it helps.

Regards,

Priyanka Salunke

View solution in original post

6 REPLIES 6

Sumanth16
Kilo Patron

Hi @AnketA ,

 

Sharing the solution here as well

1) For portal -> getDisplayValue()

2) For native -> getDisplayBox()

Note: The solution requires this Isolate Script field as false considering the window object in script being used

Example: my variable "requester" is reference to sys_user table

function onChange(control, oldValue, newValue, isLoading) {
	if (isLoading || newValue == '') {
		return;
	}
	if(window == null){
		var valuePortal = g_form.getDisplayValue('requester');
		alert('Portal->' + valuePortal);
	}
	else{
		var valueNative = g_form.getDisplayBox('requester').value;	
		alert('Native->' + valueNative);
	}
	//Type appropriate comment here, and begin script bel

 

 

Please, don't forget to mark my answer as correct if it solves your issue or mark it as helpful if it is relevant for you!

 

Thanks & Regards,

Sumanth Meda

AnketA
Tera Contributor

Thanks Sumanth,

 

I tried using "getDisaplyValue()" also but when i try to call method with getd*  the only method it is suggesting me is "getDecimalValue()"  no other method starting with DScreenshot 2024-08-06 143946.png