- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2022 04:11 AM - edited 11-28-2022 05:06 AM
Hello All,
I have a cloned widge of Copy Data Instance from table "Instance with Table [sp_instance_table]" and is there a way that open in new tab could be added along with "show matching" etc
@Ankur Bawiskar @Mark Roethof @Community Alums @Mohith Devatte @Anil Lande @Jaspal Singh
Open in New tab or ctrl option from Portal list view
Please advise
Also, is there a way to change the backend/help text of the search from "Keyword Search" to something else?
I am looking for options to open any Incident record in a new window when selected from the data table cloned widget
Thanks,
DB
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2022 06:20 AM - edited 11-28-2022 06:21 AM
@DB1 Did the solution solve your problem?
So my code would have created a new button and when you click on the button it opens the record in new window
if not let me know if you need any alternative
If this solved the issue can you please mark the answer correct and close the thread so that it will be helpful for others in future?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2022 06:53 AM - edited 11-30-2022 06:54 AM
@DB1 but i can see the OOB code is this in my PDI .Did you change any code ?
just replace your widget id in the last line instead of test
(function(){
/* "use strict"; - linter issues */
// populate the 'data' object
var sp_page = $sp.getValue('sp_page');
var pageGR = new GlideRecord('sp_page');
pageGR.get(sp_page);
data.page_id = pageGR.getValue("id");
$sp.getValues(data);
if (data.field_list) {
data.fields_array = data.field_list.split(',');
} else {
data.field_list = $sp.getListColumns(data.table);
}
if (input) {
data.p = input.p;
data.o = input.o;
data.d = input.d;
data.q = input.q;
}
data.p = data.p || 1;
data.o = data.o || $sp.getValue('order_by');
data.d = data.d || $sp.getValue('order_direction');
data.page_index = (data.p - 1);
data.window_size = $sp.getValue('maximum_entries') || 10;
data.window_start = (data.page_index * data.window_size);
data.window_end = (((data.page_index + 1) * data.window_size));
data.filter = $sp.getValue("filter");
var gr = new GlideRecordSecure(data.table);
if (!gr.isValid()) {
data.invalid_table = true;
data.table_label = data.table;
return;
}
data.table_label = gr.getLabel();
options.table = data.table;
options.fields = data.field_list;
options.o=data.o;
options.d= data.d;
options.filter=data.filter;
options.window_size=data.window_size;
options.view = data.view;
options.useInstanceTitle = true; // to make sure Data Table widget uses headerTitle always
options.headerTitle = options.title;
options.show_breadcrumbs=true;
options.enable_filter=true;
data.dataTableWidget = $sp.getWidget('test', options);
})();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2022 02:43 AM
@DB1 Sure in the client controller i handled the redirection part in this below function at the top of your client controller script find it and replace it with below code
c.openRecord=function(id)
{
window.open("/sp?id=ticket&table="+c.data.table+"&sys_id="+id ,"_blank");
}
Hope this helps
Accept this solution if it helped you
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2022 06:01 AM
@DB1 Can you paste a screenshot of the widget from portal once?
Can you see any new columns called actions and a button named "Open record " under that column for every row?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2022 06:18 AM
I do see them and thanks a lot! now the list layout has changed though. Looks different although the parent record has the right columns
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2022 06:20 AM - edited 11-28-2022 06:21 AM
@DB1 Did the solution solve your problem?
So my code would have created a new button and when you click on the button it opens the record in new window
if not let me know if you need any alternative
If this solved the issue can you please mark the answer correct and close the thread so that it will be helpful for others in future?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2022 06:27 AM - edited 11-28-2022 06:32 AM
Sure Mohith how to change that "Keyword Search" help text on the search field
Also, how to change the list layout
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2022 06:33 AM
@DB1 in HTML of inner widget go to 17th line and you can see the word key word search and then replace it with your text