- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2022 05:29 AM
Hi Priyanka,
i have used the Data table widget using macro variable. i am seeing result like below.
i am getting any table view, Please let me know if missed anything.
Or can you help me to create some custom widget to display table records and use it in catalog variable
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2022 10:52 AM
I think this is related to your "hide submit" button post (please close the thread if you have found a solution)?
https://community.servicenow.com/community?id=community_question&sys_id=aeaf6d5d1b374990c17111751a4bcbc3
I guess in this case you want to go with the custom widget solution. The Widget is down below, here is an example of how this will look like:
Name: My Incidents
Body HTML Template:
<div>
<sp-widget widget="data.widget" />
</div>
Server script:
(function() {
data.widget = $sp.getWidget('widget-data-table', {
table: 'incident',
filter: 'assigned_toDYNAMIC90d1921e5f510100a9ad2572f2b477fe' // <Assigned to> <is dynamic> <Me>
});
})();
If you want a different filter, simply go to incident.list use the filter and then right click on the breadcrumbs: "Copy query" and paste this query in the server script.
Please let us know if this solved your problem 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2022 07:22 AM
the "sys_id" used in the client script is ".v" + <widget-form sys_id>, so if you use a different widget in the spModal.open, you have to use the sys_id of this widget instead.
works 100%, please check again if you configured the client script properly:
heres the proof of this method working:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2022 01:50 AM
Thanks
What instead of all this I just want when the user clicks the Record it should open in new tab in native ui ? how can i do this?
thanks a lot for the efforts.....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2022 02:50 AM
$scope.$on('data_table.click', function (event, params) {
$window.open('nav_to.do?uri=%2F' + params.table + '.do%3Fsys_id%3D' + params.sys_id, "_blank");
});
Hope this answers all your questions 🙂
Please mark the solving answer as the solution to close the thread if you got no more questions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2022 10:36 PM
hi
I have members table which has users in it and I want to display groups which I am the member of . But If i do directly it will show the members table (i.e group names only and user ) but instead I want to show the group table for it .Below are the table structure attached pls have a look. Groups Name in Members table is a reference type referencing to u_grp_table.
Members Table(u_grp_members)
Groups Name |
User |
Y_test_grp |
Allen Thomas |
Z_test_grp |
Allen Thomas |
K_test_grp |
Allen Thomas |
Groups Table(u_grp_table)
Groups Name |
Group Description |
Group Template |
Y_test_grp |
Check y grp |
Simple |
Z_test_grp |
Check z grp |
Columns |
K_test_grp |
Check k grp |
double |
A-test_grp |
Check a grp |
simple |
B_test_grp |
Check b grp |
simple |
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2022 02:29 AM
Hi
Hi ,
I have used data table in my custom created widget but the alignment is not proper displaying the data.In the first line there is some extra space coming.
eg: if you see group decription 'c' starts one space as compared to the second line the word 'n'.Ideally C and O should be in the same alignment
Groups Name |
Group Description |
Group Template |
Y_test_grp One space |
Check y grp One space extra frm 1st line |
------------------extra space here also Simple |
Z_test_grp |
Check z grp One space extra |
Columns |
K_test_grp |
Check k grp One space extra |
double |
A-test_grp |
Check a grp One space extra |
simple |
B_test_grp |
Check b grp One space extra |
simple |
I haven't used anything in html I have just fetched the widget