cancel
Showing results for 
Search instead for 
Did you mean: 

Collection validation on add item

Former Member
0 Kudos

Hi All,

I am trying to run Collection Validation script on class: Master Agreement for target: Collaborators. I want script to execute when a new collaborator is added to list. Right now the script is triggered if any changes are made to the collaborator list. But how to identify whether addition is performed on list?

Thanks,

Saloni

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

You should write the script On Create for that collection.

Thanks

Devesh

Former Member
0 Kudos

Hi Devesh,

Thanks for your reply. I tried writing script on Document Life Cycle of Collborator Role class, Target: Created. But the script is not triggered when new collaborator is added to the Collaborators list.

And if I need to write Collection Validation on Master Agreement class, Target: Collaborator, Then what will be the condition to write On Create check?

Thanks,

Saloni

Former Member
0 Kudos

Hi Saloni,

a suggestion would be to create a hidden field (Data type: INTEGER) and you would populate that field with the size of the collaborator collection which you could do everytime the document is opened. Whenever, the collection size changes i.e. gets bigger, you know that somebody added something.

Hopefully that solves your problem.

Thanks,

Armin

Former Member
0 Kudos

Hi Armin,

Thanks for your reply.

I would also like to know which item is added to the list. Is there any way to check it?

Suppose, we add an hidden field to maintain the count and then on Field Data Edit of that field, we check its new value against its old value. Now, we are able to check if any addition or deletion took place. But is it possible to identify the item that is added or deleted from list?

Is there anything we can do on Collection Validation of Contract Documents, where script get triggered on Contract Documents modification. but is there any check to determine if something is added to it or deleted from it. And what item is modified?

Thanks,

Saloni

Former Member
0 Kudos

Hi Saloni,

Were you able to solve this problem? If so, could you please direct me ?

Help will be appreciated

Regards,

Bindu