Data Validation in a pagelist

We  had a requirement to ensure that a specific value was not repeated in a Page List.Page list contains list of frameworks.When user tries to select same framework for the second time,error must be thrown .Can any one explain? Thanks in advance.

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.


Keep up to date on this post and subscribe to comments

April 2, 2016 - 2:06pm


May 12, 2016 - 10:05pm

You should try to prevent duplicates in the list in the first place.

Use @IndexInPageList().

If a number greater than 0 is returned the value is already there so do not append to the list.

If you are querying try to retrieve distinct rows.

May 24, 2016 - 8:46am

Their is a page list and i want to find a specific sting(like "am" form "iama") from a list if it is found i required count, Could any one please help me.

June 8, 2016 - 8:13am

@String.contains( ) can be used to find whether a particular string is present from a list .

June 21, 2016 - 6:15pm

You could try using  IndexInPageListWhen(String whenName, ClipboardProperty lookin)

But to do that you would first need to set some Property or Parameter on the Clipboard before calling that Function otherwise the When rule rule would not know what value to compare against a particular Property in each Page of the PageList.

That is, the When rule would encapsulate the "lookAt" Property but is up to you to supply the "lookfor" value through some means.

@String.contains() could be used as the comparison - does not have to be an exact match.

You could perhaps develop your own Function: IndexInPageListWhenLookingFor(String lookfor, String whenName, ClipboardProperty lookin)

That function would set "lookfor" into a parameter then return IndexInPageListWhen().