Bring data from Embedded List to Client Script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2016 12:05 AM
Hi,
Is there a way to bring the data from embedded list to Client script for data validations?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-08-2016 12:39 AM
Hi Paul,
Unfortunately NO. But I did a workaround for this by creating an After Insert Business Rule on Parent table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-08-2016 02:38 AM
Hi Srini,
Did you try creating onCellEdit() type client script set on the table which is embedded in your form and the field which you wish to validate?
This article explains what parameters it can return for data validation:
Client Scripts - ServiceNow Wiki
I could set up an onCellEdit() client script on my embedded table, and it got triggered from the form when I edited the embedded list cell, and had access to its parameter values:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-08-2016 08:14 AM
But, My data validation has to happen parent and child table columns simultaneously. Something like this: Parent.Start_date > EmbeddList.start_date
Any suggestions?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-08-2016 01:11 PM
var parent= new GlideRecord("your parent table name here");
parent.query();
var embedded_list = new GlideRecord("your embedded list table name here");
embedded_list.addQuery('current.start_date' , '>' , parent.start_date);
embedded_list.query();
while(embedded_list.next()) {
//write script for fields you need

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2017 01:26 AM
I have also the same requirement. i need get the data from embedded list and match with another table. if it's same then give some pop up on form and if it's not same then form will submitted successfully.
mallen_nspi ctomasi rfedoruk tltoulson
Just want to know how to get the data from embedded list.
Please suggest.
Thanks,
Harshvardhan