- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2022 12:13 AM
Hi All,
Can we duplicate the related lists on the same form.?
If yes, how to do it.
I am having feature and release tables , where in feature record, there is a reference field of release table with field name parent. So, it created a related list on release form.
In my requirement I need to duplicate it and add few conditions.
Thanks in Advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2022 02:12 AM
Try this
(function refineQuery(current, parent) {
current.addQuery('u_deliverable', 'Main Deliverable');
current.addQuery('parent.number',current.number);
gs.addErrorMessage("feature is " +parent.getDisplayValue());
gs.addErrorMessage("release is " +parent.number);
})(current, parent);
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2022 12:38 AM
Hi Renu
Yes You can create a related list with the filters you need.
- You need to create a Relationship https://docs.servicenow.com/bundle/paris-platform-user-interface/page/administer/form-administration...
- After you create a relationship, navigate to your form and bring the related list onto your form.
Try and let us know If you're stuck.
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2022 02:12 AM
Try this
(function refineQuery(current, parent) {
current.addQuery('u_deliverable', 'Main Deliverable');
current.addQuery('parent.number',current.number);
gs.addErrorMessage("feature is " +parent.getDisplayValue());
gs.addErrorMessage("release is " +parent.number);
})(current, parent);
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2022 01:08 AM
Hi Renu,
You have to create a different Relationship record with the same conditions, and then add it in the related list. When creating the relationship records you can add the conditions also
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2022 01:49 AM
Hi
Query from table :rm_feature
Applies to table: rm_release
Query with:
(function refineQuery(current, parent) {
current.addQuery('u_deliverable', 'Main Deliverable');
current.addQuery('parent.getDisplayValue()',parent.number);
gs.addErrorMessage("feature is " +parent.getDisplayValue());
gs.addErrorMessage("release is " +parent.number);
})(current, parent);
number is a field on release table, parent is a field of reference type(rm_release) on feature table.
Even though both the error messages are giving the same result, script is not working for current.addQuery('parent.getDisplayValue()',parent.number);
Please suggest any changes