Add a search field by header using PeopleSoft - peoplesoft

I’m looking to add search fields in each table header automatically using peoplesoft.
Example

Javascript solution:
add an html area to your page (with rec field)
assign via peoplecode an html object to the field
use something like this Javascript Filter on the table
For this to work well, your grid needs to show all rows and not paginate.
If it paginates and you need to keep the pagination, then you need to go for the PS solution:
Add one search field per header you want to search
On the fieldchange you perform a rowset flush then .Select(" WHERE ...") to populate it based on the filter

Related

Is there a way to get a list of hidden column

I want to save the list of hidden columns so that next time when the table is loaded I show the table with the same set of column which the user chose to see in the past. Is there a way to get a list of all hidden columns in bootstrap-table library.
You can use the cookie extension to solve your problem, here is an example: http://issues.wenzhixin.net.cn/bootstrap-table/#extensions/cookie.html.
The plugin saves:
Sort order
Page number
Page number from the list
Visible columns
Search text
Docs here: http://bootstrap-table.wenzhixin.net.cn/extensions/#table-cookie
you can use the jquery datatables plugin to easily handle this problem, this plugin auto generate the table columns and show that.
you will get more information from link below,
https://www.datatables.net/
hope it helps.
try this below
var tab = $('#table').bootstrapTable('getHiddenColumns');
$.each(tab, function(index, value) {
alert(value.title);
})

Augment SilverStripe UploadField

I'd like the augment the HTML that gets appended to the Upload field on a file upload and add but I can't seem to find where the where the div.ss-uploadfield-item-info is added.
Specifically I'd like to add a second hidden input after the file ID field.
You need to overwrite the template for the uploadfield, the original is in /framework/templates/UploadField.ss. Using ->setTemplate('YourTemplate') you can even set the template for one single instance of the UploadField.
The hidden field can either be set statically in your own template or using HiddenField.

Drupal select list key in template file

How would I go about getting the key of a select list field in a view template (Row style output)?
The field is added to my view and hidden from display. It contains stuff like:
red|Red
green|Green
blue|Blue
How can I get the selected key (ie. red) for the field in the template?
I was able to print it using:
$view->field['field_color']->view->result[0]->field_field_color[0]['raw']['value']
but I wonder if there is an easier way to get that key.
Thanks in advance.
$row->field_field_color[0]['raw']['value'];

How to Get GA to do Site Search with Tumblr

In Tumblr, searches are set up so that the query is a method/parameter of the search controller. Basically it looks like this: /search/:query.
I've been playing around from the client side trying to edit it so that it posts in this format:
/search/example?q=example
I'm doing this because GA looks for a parameter in searches. My problem is is that from the JavaScript to the form methods and actions, I cannot get the thing to spit out a query parameter at the end.
Is there anyway to tell Google to look for /search/:query instead of looking for a parameter in the URI?
Yes, you can do this by creating an advanced filter.
Go to your account Admin and then either click on the Account > All filters button on the left, or else the View > Filters button the right. Which one you use depends on whether you want this to be applied to all properties/views of the account, or only to an individual view.
Then, click the + New Filter button.
Enter in a name for your Filter Name such as "search string"
For filter type, select Custom filter radio button.
Then select the Advanced radio button.
Then from the Field A->Extract A dropdown, select Request URI. In the input field to the right of this, enter in ^\/search\/(.*)
Then from the Output To->Construtor dropdown, select Search Term. In the input field to the right of this, enter in $A1
Then save the filter and you should be good to go.

How do I customize the print layout of a SharePoint list item?

i need to be able to produce a "pretty" printout of an individual list item's values, with the goals being:
get rid of all navigation
organize data as it would appear on a typical paper form (a customer requirement)
i'm avoiding using InfoPath at this time due to other issues (which i'll post separate questions for...)
for example, i have an individual list item that normally displays similar to the following DispForm.aspx example:
i need a printed version (PrintForm.aspx??) that will display similar to the following example:
from what i can tell, i can't do this just by modifying/creating custom CSS.
it also seems that i can't quite do this just by creating my own "print" version of DispForm.aspx.
any suggestions, ideas, links would be very helpful.
Creating a custom list form is probably what you want. Without the master page attached to it or anything.
You can find a walkthrough here that will get you started:
http://office.microsoft.com/en-us/sharepointdesigner/HA101191111033.aspx
Enjoy.
You could use CSS to hide all the navigation etc. that you don't need using a media="print" stylesheet, but you won't be able to make the exact changes to the layout you've illustrated.
If it doesn't have to be exactly like the example, it would be fairly trivial to hide all but the name->value table and just print that. If you really do need to merge fields and re-layout the table then you likely have to hack up the server-side.
Why can't you create your own version of the page?
Using Sharepoint Designer, you could create a custom aspx page that uses a dataview webpart to do this...
#mortenbpost's link was just what i needed:
Create a new page that contains a custom list form
specifically, here's what you need to do to get a "basic" custom page for a list item -- from which you can completely customize it with XHTML/CSS:
first
ensure your list has all the columns you'll need
second
here's how to create a custom "view" page (virtually the same steps can be followed for a custom "new" or custom "edit" page):
Open MS Office SharePoint Designer
File -> Open Site...
enter your web-site URL
Make sure the "Folder List" Task Pane is visible (Task Panes -> Folder List)
Expand the "Lists" folder
You should see entries like the following:
Announcements
Calendar
...
YOUR LIST NAME
...
Expand the entry with YOUR LIST NAME
You should see entries like the following
Attachments
Items
AllItems.aspx
DispForm.aspx
EditForm.aspx
NewForm.aspx
Right-Click on YOUR LIST NAME
Select New -> ASPX
Re-name the file to something meaningful, like: PrintForm.aspx
Open PrintForm.aspx
View in "Split" mode
In the Code pane, you should see your insert-point inside a blank html form
Insert -> SharePoint Controls -> Custom List Form...
Select YOUR LIST NAME from the first drop-down (List or document library to use for form)
Select "Item" from the second drop-down (Content type to use for form)
Select "Display item form (used to view list items)" (this is where you choose between view, new, edit)
Un-check "Show standard toolbar" when creating a printable form
Click OK
In the Design pane, you should see a basic table layout with labels on the left and values on the right
In the Code pane, you should see such code as the following for every Column in your list (this one's for a "Single line of text" column type):
<tr>
<td width="190px" valign="top" class="ms-formlabel">
<H3 class="ms-standardheader">
<nobr>Column name</nobr>
</H3>
</td>
<td width="400px" valign="top" class="ms-formbody">
<xsl:value-of select="#Column_x0020_name"/>
</td>
</tr>
You can now just take all those <xsl:value-of select="#Column_x0020_name"/> entries and do standard XHTML/CSS layout
To test, save your work
Then, in a web browser, navigate to your SharePoint web-site
Select an item you've already entered data for
Choose "View Item"
In the address bar, replace DispForm.aspx with PrintForm.aspx
some things to keep in mind:
spaces and punctuation characters make for annoying naming of Column name
Column name in the code will have a maximum length of 32 -- any names longer will be truncated, e.g.:
SharePoint Column name: this is a long name
becomes in the code: this_x0020_is_x0020_a_x0020_long
any Column name in the code that would be a duplicate will be length 32 plus a numeric suffix. so, given the above column also exists, we would then have e.g.:
SharePoint Column name: this is a long name also
becomes in the code: this_x0020_is_x0020_a_x0020_long0
if you add columns or modify columns, you'll have to add them in by hand to this page
(do the Insert -> SharePoint Controls -> Custom List Form... on another "dummy" page to get the naming right)
again, i couldn't have done this without #mortenbpost's answer!
*****You can now just take all those entries and do standard XHTML/CSS layout *****
can you expand this with an example on how to do it?
This isn't an answer so much as a note to the above.
Use a custom list form but keep in mind that if any of the columns have versioning turned on you will not be able to get at the "data" easily. For example if one of your colums is a Notes column and everytime someone edits the notes field a new version is appended then none of that is accessible as it's essentially a seperate "list." I'm stuck on this issue as I also have a client asking for a print out which "doesn't look like it's from SharePoint."
Alternatively, you could export to a spreadsheet & print from there.

Resources