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



May 5, 2014, 10:13 PM
10 Posts

Check saved value

  • Category: Other
  • Platform: All
  • Release: All
  • Role: Developer
  • Tags:
  • Replies: 3

Hi

Is there anyway to check when you type in to a field if there already are any document saved with that value in that field. Ex, if you type projectno i want to check if any other document already have that projectno. Any suggestion how i will validate that

 

regards

May 6, 2014, 2:48 AM
366 Posts
Create a view based upon that field

When you validate that field you can get the view column as a collection and see if the newly typed value is a member of that collection.

 

If it is then validation fails and they have to type in another Value

May 6, 2014, 4:47 AM
10 Posts
Thank you

Thank you for your answer. I guess it was something like that. But how will i use it and where will i trigg it when i use xpages validation for fields?

May 6, 2014, 1:24 PM
366 Posts
In the querySave event of the document data source

is where I do my field validations.  If this event returns "false" then the document is not saved and the page remains open.

Use SSJS to do the lookup.


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