Relationship table query.

Alok21
Giga Expert

Hi All,

I have created a relationship table as per attached and it is showing only 1 record even though i am creating multiple records(thru UI Action) from same form. Can you please check and advise what query should i write to achieve this functionality.

I also created m2m table but there we need to add it manually the records and i don't want to do it manually.

Regards,

Alok

9 REPLIES 9

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Alok,

Can you update the query as follows and try once:

current.addQuery('u_incident', parent.sys_id);

Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur,

I have tried this code and it is showing all the records from relocation table and i don't want that.

I only wants to show the records that are created through UI action(Create Incident) from this particular form.

Can you please assist how this can be achieved?

Regards,

Alok

 

Hi Ankur,

Did you manage to find a script that would meet by functionality?

Or am i looking for some functionality that cannot be achieved in service-now?

Would appreciate your update on this.

Regards,

Alok

Hi Alok,

Just wanted to understand below

Is there any field on incident which stores relocation request?

if no then this query should run

current.addQuery('u_incident', parent.sys_id);

Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader