This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Jun 12, 2012, 7:29 AM
25 Posts

Difference between getItemvalue() and getItemValueSubmitted()

  • Category: Server Side JavaScript
  • Platform: Windows
  • Release: 8.5.2
  • Role: Developer
  • Tags:
  • Replies: 2
Can any one please let me know the difference between getItemvalue() and getItemValueSubmitted().
 
Some time getItemvalue() works correctly but some time gives an issue. Thanks in advance.
Jun 12, 2012, 8:32 AM
126 Posts
Re: Difference between getItemvalue() and getItemValueSubmitted()
Similar to the getValue() and getSubmittedValue() of controls the Submitted value is the value that is sent to the server from the control, the value is the value that the control holds currently, the difference is that the current value may
have a converter applied to it or have been modified in some way with script etc.
Jun 12, 2012, 8:38 AM
26 Posts
Re: Difference between getItemvalue() and getItemValueSubmitted()
Hi,
getItemValue returns the  value of the document (Notes backend doc) as an array.
 
getSubmittedValue() return the value of an item, which has just been submitted. Moreover, it returns the value as it is, e.g if there are any tags, then it does not removes those tags. such as bold text, underlined text. etc.
 
Example of getItemValue:
var v = document1.getItemValue("Numbers");
if (v.isEmpty()) {
	return "Numbers is empty or doesn't exist";
} else {
	var result = "";
	var vi = v.iterator();
	while (vi.hasNext()) {
		result = result + vi.next().toFixed() + "\n";
	}
	return result;
}
 
example of getsubmittedValue()
 
Below code gets the value of a computed field, which just has been submitted. 
var element=getComponent('computedField1');
element.value=context.getSubmittedValue()
 

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal