Relationship table query.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2018 04:53 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2018 02:28 AM
Hi Ankur,
I had created a reference field(Relocation request) in incident form.
The query you mentioned above is fetching all the records from incident table and that is not my requirement.
I only want the records that is created through UI action(Create incident) in my relocation form.
E.g- If i create two record through UI action(Create incident) than only this two records should show in the related list and not all the records.
I hope you understand my requirement.
Regards,
Alok
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2018 02:37 AM
Hi Alok,
So I think you want only those incidents which are created through UI action; so when you are clicking on UI action are you populating the Relocation request field in incident?
if yes then I think you can add 1 more query relocation request is not empty.
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2018 03:07 AM
Hi Ankur,
Yes, I have added a reference field(Incident) in my custom table(Relocation request). When i am clicking on UI action(Create Incident), it is creating a new record in incident table and populating the incident number in reference field.
One more query- Can i populate multiple incident numbers in the reference field(Incident)?
I have attached the details for your reference.
Regards,
Alok
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2018 03:22 AM
Hi Alok,
Since it is a reference field i.e. lookup it can hold only 1 value at a time.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2018 03:39 AM
Hi Ankur,
okay. So how can my requirement be achieved?
Regards,
Alok