Data Table Widget
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2016 10:29 AM
Using the Data Table widget in the Service Portal that comes with Helsinki. Cloned it so that I could make it work for me. I added the table name (change_request) and added the fields I wanted to see. That however doesn't seem to be what that field means when I edit the widget. The widget defaults to 4 fields (Number,Category,Short Description and Approval). I did not select all of these and actually added a couple others I wanted to see but they don't show. I love the look of the table that it presents, but it's just not acting the way I expected. What am I missing about customizing/configuring a widget?
- Labels:
-
Performance Analytics
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2016 01:31 PM
You have to Clone it first. You cannot modify the base widget. You can then modify the clone.
Stanley Martin
ServiceNow Developer
Epiq
Corporate Services
Phone: 913-621-9824
Cell: 913-216-1031
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2016 01:35 PM
Yes. I have created a clone and I'm working on the HTML code of the clone.
Thanks.
Darshak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2016 03:07 PM
darshak I ran into the same issue, here is what worked for me:
replace this part of the HTML template:
<span class="dropdown-toggle glyphicon glyphicon-menu-hamburger" style="line-height: 1.4em"
with this:
<span class="fa fa-{{options.glyph}}"
and delete this section:
<i ng-if="options.glyph" class="fa fa-{{options.glyph}} m-r"></i>
now you can select your own glyph from the options.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2016 01:32 PM
Hi Darshak,
I would remove some code that references that data.view variable, so that you can get a better sense of where your code is breaking. It is just accepting a string and then it will retrieve the relevant columns related to that specified view. With regards to the glyphs not working, thats on ServiceNow. They might need to update where the API is pointing but I ended up just using FontAwesome Fa-fa-icons.
Best,
Phil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2016 05:22 AM
Morning Darshak Adhikarla,
I was reading some of your requirements again and it seems like you are trying to change the view from the initial default view. Correct me if I am wrong. So the best way to do that is with some type of button, on your html that triggers a function on your client controller. What the function on your client controller is going to need to do is send back to the server which view it needs to toggle to. How to accomplish that goal is with this c.server.update() that will send back a new object to your server side code with an input object using conditionals you can check if that new input object exists and if it does reassign the data.view variable and that hopefully should provide the results that you are looking for. With regards to the c.server.update() here is more information on how it behaves: Widget scripting
Please let me know if you have any more questions.
Best Regards,
Philip Engles