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



Jul 24, 2012, 9:05 AM
8 Posts

@Formulas not supported in XPages.

  • Category: Server Side JavaScript
  • Platform: Not Applicable
  • Release: 8.5.3
  • Role: Developer
  • Tags: xpages,Lotus Notes client,javascript
  • Replies: 5
Hi All
I am working with XPages. But there are some @Formulas like  @GetDocField, @SetDocField, @GetProfileField, @DocumentUniqueID are not supported in XPages.
Does anybody knows which code we can write instead of these formulas?
 
 
Thank you.

1.  

Jul 24, 2012, 10:02 AM
122 Posts
Re: @Formulas not supported in XPages.
All the back-end Domino objects available for LotusScript or Java are also available in Server-Side JavaScript. Because @Formulas in XPages just map back to those methods, @Formulas tend to perform worse in XPages than using Domino objects. So I'd recommend using those objects, so for @GetDocField you can use database.getDocumentByUNID() and document.getItemValueString() if it's a string
Jul 26, 2012, 10:31 AM
8 Posts
Re: @Formulas not supported in XPages.
Which code we can used for @DocumentUniqueID?
Jul 26, 2012, 11:49 AM
43 Posts
Re: @Formulas not supported in XPages.
 
var doc:NotesDocument = your document                                                //eg. database.getDocumentByID();
doc.getUniversalID()                                                                                      // Universal Id and Unique id are same as far as I know
 
Regards, 
 
CHINTAN P. 
Jul 27, 2012, 7:20 AM
18 Posts
Re: @Formulas not supported in XPages.
  Hope this helps you
 
@GetDocField : getComponent("Field Name").getValue()
 
@SetDocField : getComponent("Field Name").setValue("New Value") 
 
@GetProfileField : 
 Profiledoc:NotesDocument= database.getProfileDocument("ProfileDocName","")
ProfileDoc.getItemValue("field Name") 

 
 
Jul 31, 2012, 6:48 AM
8 Posts
Re: @Formulas not supported in XPages.
Thank you all
 

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