how to set the field value unique using script ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2016 02:42 AM
Hi,
i have two fields X and Y,
if my X- field has a value "123" and Y - field has a value as "456"
then my Y field should not take any other value as "456" (for my X - field "123" ). it should throw an error as "record exist already".
Please help me out with using script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2016 11:04 PM
Hi Togla,
thanks for your response.
but when my X field have different value(not 123) than it should accept Y field value as "456" .
appreciate your feedback.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2016 01:50 AM
Hi Sarath
What about just adding another query condition?
gr.addQuery("X","!=","123");
Wouldn't that work? So it only searches for duplicates, where X is not 123.