Cust DispForm.aspx with a custom column
I am creating a Custom Display form for a list. My issue is that I have a custom column that I created. It is a Linked picture. My issue is this when the xslt form displays it is displaying the custom column as 2 links instead of the picture
wrapped inside of a link. I want to run jquery to grab the results split them and reconstruct the field but I am having an issue writing the jquery. I know it is suppose to be something similar to the following. I believe the cdata
is suppose to be wrapped inside an xsl tag but I am not sure and if it is what tag should it be wrapped inside of
<script type="text/javascript" src="/</script">Documents/jquery-1.10.1.js"></script>
<script language="javascript" type="text/javascript">
$(document).ready(function()
<![CDATA[ var thisLink = $(this).attr("@Logo").split(",");
var out = "<a href=" + thisLink[0] + "><img src=" + thisLink[1] + " border=0 /></a>";
$("#DisplayIt").append(out); ]]>
</script>
<ul id="DisplayIt"/>
I ended up getting it to work by doing the follow:
<a>
<xsl:attribute name="href">
<xsl:value-of select="substring-before(@Logo, ',')" />
</xsl:attribute>
<img>
<xsl:attribute name="src">
<xsl:value-of select="substring-after(@Logo, ',')" />
</xsl:attribute>
</img>
</a>
Similar Messages
-
Dispform.aspx with content types
SharePoint 2013 farm.
I have two content types in a list. I need to change the dispform.aspx.
There are different fields for both content types, so copying the dispform.aspx to create and modify a new one is not a solution I think. I am not sure. i am new in this :)
Can someone give me a step by step, how to modify the displayform of a list so that I can customize the the form for both content types.
best regards,
OlafurHi Olafur,
There is a way in SharePoint Designer to specify which form the different content types in a list or library will use.
Open up the list, click on the content type name:
On the Content Type screen, under the forms section, there is a text field where you can enter the relative path to the new form that you created.
Reference:
http://social.technet.microsoft.com/Forums/en-US/8f62d12d-8b72-40c7-baa4-59f4c211e86a/calendar-unique-newform-for-each-content-type?forum=sharepointgeneralprevious
Best Regards,
Eric
Eric Tao
TechNet Community Support -
Dynamicaly Filtering a list with a custom column
In my site pages library I added two columns. A customer name column (Dell, Apple, HP, ...) and a page type column ( Client Page, Project Page). If I were to go to a Dell client page I want to have a list of pages with the view of Dell pages
that are also a Project Page. The problem that I am having is that I can not get the view to use the dynamic filter.You will have to create a list with URL for all pages and clients align to the page. Then use below cascading dropdown
http://spservices.codeplex.com/wikipage?title=%24%28%29.SPServices.SPCascadeDropdowns
http://spcascade.codeplex.com/ -
How to Hide fields on customized DispForm.aspx in SharePoint 2010
Hi There,
I have been facing with this issue since 4 weeks, let me explain my requirement first.
I want to hide 2 fields on DispForm.aspx of a custom template.
Following are the lines of code written for customizing DispForm.aspx using ListFieldIterator SP control.
<SharePoint:ListFieldIterator runat="server" ExcludeFields="PublishingStartDate">
<CustomTemplate>
<tr>
<td class="fp-ms-vb2">
<SharePoint:FormField ControlMode="Display" DisableInputFieldLabel="true"
runat="server">
</td>
</tr>
<tr style="height:5px;"><td></td></tr>
</CustomTemplate>
</SharePoint:ListFieldIterator>
those 2 fields are also generated using ListFieldIterator control.
Can someone suggest me how to hide specific fields.
Thank you in advance,
Vikram
vikram padigalaTo add more
http://social.msdn.microsoft.com/Forums/sharepoint/en-US/4c366cd9-dd84-440c-bdbc-30ee2c81876e/conditionally-hide-a-field-in-a-custom-form-using-sharepoint-designer
http://social.msdn.microsoft.com/Forums/sharepoint/en-US/7aef4e74-63f1-4f02-96d7-21f9549fc924/how-to-filter-the-field-based-on-condition-using-conditional-formatting-in-sharepoint-designer-2010
http://johnliu.net/blog/2011/2/23/spd-2010-conditional-formatting-to-hide-columns-based-on-a-r.html
Please remember to click 'Mark as Answer' on the answer if it helps you -
Content Search Query Builder - filtering for custom column value
I want to use a CSWP to display certain pages in a slideshow format on a site. However, to filter them in a preferred manner, the pages library has a custom column "Spotlight" which is a Boolean type (e.g. yes/no).
In my "Build Your Query" configuration page, I have added a keyword filter "SpotlightOWSBOOL=Yes" as the criteria to display my results. This is not working, despite the fact that I currently have pages flagged as "Spotlight"
in this library.
My question is - how can I achieve this result of displaying only pages with a custom column value "Spotlight" as "Yes"?Hi Owen,
Could you capture a screenshot about your Crawled Property for your list column "Spotlight"? Is it name "SpotlightOWSBOOL"?
If your library column name is "Spotlight", you can create a custom
Manged Property (e.g. create name as SpotlightMangedProperty)to map the
Crawled Propery (e.g. may ows_spotlight, or ows_SpotlightOWSBOOL?) genegrated by list column "Spotlight", then start a full crawl.
Then you can add the keyword filter like below in "Build Your Query" dialog of CSWP web part, then check if the correct items are filtered.
SpotlightMangedProperty:"yes"
If the above value "yes" doesn't work, please also try
SpotlightMangedProperty:"True", or try SpotlightMangedProperty:1
More information about this topic you can read is below.
https://technet.microsoft.com/en-us/library/jj219667.aspx#proc2
https://msdn.microsoft.com/en-us/library/office/ee558911.aspx#kql_property_restriction_queries
Thanks
Daniel Yang
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
Can't Save Custom Columns in Effects Tab?
In the now archived thread at
<http://discussions.apple.com/thread.jspa?messageID=5264320�>
Jerry Hoffman and D. Gilmore describe how to right-click on a column in the Browser (other than the Name column) and then choose the Save Column Layout option, which is exactly what I'm wanting to do. Weird thing though is when I try to do this for the custom column layout I've created under my Browser's Effects tab, that "Save Column Layout..." option is greyed out, along with most of the others as well.
Under the Project tab, I can Save and Load column layouts to my heart's content, but under the Effects tab, the only options which AREN'T greyed out when I right-click on a column heading (any column heading) are Hide Column (at the top) and Show Thumbnail (at the bottom). The other five in between (including Save Column Layout) are inaccessible.
Am using 6.0.2 with OS X 10.5.2. Any theories?
Bonus Question:
Is there any way to make a custom column layout in the Browser be part of a custom window arrangement, so that when I select one of my custom window arrangements FCP will load my preferred Browser column layout at the same time?
Thanks,
John Bertram
TorontoThanks to both Jerry and Doug for that confirmation -- albeit not the one I was hoping for!
And though it may come as a surprise, I did indeed create a custom layout of the Effects tab columns: with my Browser window over on a separate monitor, I like to have the Name column set wider (so the full names of all my Nattress FX are visible), then the Description column first (also set wider so I can actually see what the description says), and then my own Comments column immediately following that.
Despite the limited number of info columns in that Effects tab, it does seem odd that they would implement a Save Column Layout option in other Browser tabs, while then displaying it but not actually implementing it in this one tab.
So along with making custom column layouts part of custom window arrangements, I guess it's time I sent in yet another Feature Request to the friendly folks at FCP Feedback.
In any case, thanks again for the confirmation that at least my system wasn't doing something weird.
jb -
Refer to a column in a secondary list in a customized DispForm.aspx page
I would like to know if there is an XMl statement that will allow me to pull a column from a separate list.
I have two lists; List1 has just one item in it that holds the default values for all the columns, including Enhanced Rich Text columns.
List2 has the exact same columns, but only certain columns will contain data if that content needs to be customized from the defualt values.
I need a way so that when i check the column in List2, if it is empty, pull the corressponding column from List1 so it displays the default value.
Is there an XML/XSL statement that can do this and will actually render the Enhanced Rich Text properly?
My sample code below works great, but we cannnot leverage hidden fields as the default values can be updated anytime.
This is code that I have in the DispForm.aspx page
<td width="400px" valign="top" class="ms-formbody">
<xsl:choose>
<xsl:when test="string-length(@First) < 1">
<xsl:value-of select="@first_x002d_hid" disable-output-escaping="yes"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@first " disable-output-escaping="yes"/>
</xsl:otherwise>
</xsl:choose>The default values in List1 can change at any time. When the user opens an item from List2, it needs to show the custom values in the columns of List2, then show the current values in List1 for any of the columns they did not populate in List2, at
the time they view the item.
I dont think the calculated columns would work as it would save the values that existed in List1 at the time they saved the item in List2, right?
Also, when the users are updating List2, they want to see a form that only shows the custom data they entered in the columns, all the others should be blank. We get this with the OOB EditForm.aspx for List2, so we do nt need to update NewFrom.aspx
or EditForm.aspx, only DispForm.aspx.
The only time they want to see the aggregation of the List2 data and the List1 data is in the DispForm.aspx page. -
Need help with custom column in BI Publisher
Hi Guru's
I have started working with BI Publisher Recently and need with below issue
Can you please let me know how can i create a custom column like % based on two existing measures in the report
I tried creating it in obiee report and used that SQL to create BI Publisher Report , but the result column in obiee is not working as expected in BI Publisher,
can some one please help me with this
Thanks a lot in advance.This column can be calculated in BIP RTF template. But if it is a column inside a FOR-loop
then it may need to be calculated slightly different.
Like I said, get the xml data and rtf then send it to me : [email protected]
and will get it fixed for you.
thanks
Jorge -
Hi guys
I am newbie in vb net and I want your help to solve a problem.
I have this datagridview with two columns and all days of a month in custom columns.
[IMG]http://i59.tinypic.com/2qwpj15.png[/IMG]
I also have one combobox to change Year and a combobox to change Month.
Here is the code to load data
Private Sub fill_plan()
dgMonth.Rows.Clear()
Try
Dim i As Integer = 0
Dim query As String = "SELECT MonID,Unitname,Personel,Udate FROM tblMonth ORDER BY Unitname"
con.Open()
cmd = New OleDbCommand(query, con)
myDR = cmd.ExecuteReader
If myDR.HasRows Then
While myDR.Read
dgMonth.Rows.Add()
dgMonth.Rows(i).Cells(0).Value = myDR.GetInt32(myDR.GetOrdinal("MonID"))
dgMonth.Rows(i).Cells(1).Value = myDR.GetString(myDR.GetOrdinal("Unitname"))
dgMonth.Rows(i).Cells(2).Value = myDR.GetInt32(myDR.GetOrdinal("Personel"))
i = i + 1
End While
End If
myDR.Close() : con.Close()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
End Try
End Sub
With
this code the
personel column
loads the first
day of the month.
I want to load
the column the date that is
in the database.Hello,
This can be done with less code
Private Sub fill_plan()
dgMonth.DataSource = Nothing
Dim dt As New DataTable
Try
Dim query As String = "SELECT MonID,Unitname,Personel,Udate FROM tblMonth ORDER BY Unitname"
con.Open()
cmd = New OleDbCommand(query, con)
dt.Load(cmd.ExecuteReader)
dgMonth.DataSource = dt
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
End Try
End Sub
The above loads all rows, if you want to limit the rows placed in the DataGridView this is best done in the SQL via WHERE conditions and/or with SELECT TOP x.
Formatting of the data is best done via the property window for the DataGridView on whatever column you want too. Using the above you now need to set the data property for each column and set dgMonth.AutoGenerateColumns = False, in the end we end up with
less code
edit is there a reason for returning the primary key? If so then using my method we can hide that field but I see no reason for having it in this case
Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. -
JTable with custom column model and table model not showing table header
Hello,
I am creating a JTable with a custom table model and a custom column model. However the table header is not being displayed (yes, it is in a JScrollPane). I've shrunk the problem down into a single compileable example:
Thanks for your help.
import javax.swing.*;
import javax.swing.table.*;
public class Test1 extends JFrame
public static void main(String args[])
JTable table;
TableColumnModel colModel=createTestColumnModel();
TestTableModel tableModel=new TestTableModel();
Test1 frame=new Test1();
table=new JTable(tableModel, colModel);
frame.getContentPane().add(new JScrollPane(table));
frame.setSize(200,200);
frame.setVisible(true);
private static DefaultTableColumnModel createTestColumnModel()
DefaultTableColumnModel columnModel=new DefaultTableColumnModel();
columnModel.addColumn(new TableColumn(0));
return columnModel;
static class TestTableModel extends AbstractTableModel
public int getColumnCount()
return 1;
public Class<?> getColumnClass(int columnIndex)
return String.class;
public String getColumnName(int column)
return "col";
public int getRowCount()
return 1;
public Object getValueAt(int row, int col)
return "test";
public void setValueAt(Object aValue, int rowIndex, int columnIndex)
}Edited by: 802416 on 14-Oct-2010 04:29
addedKleopatra wrote:
jduprez wrote:
See http://download.oracle.com/javase/6/docs/api/javax/swing/table/TableColumn.html#setHeaderValue(java.lang.Object)
When the TableColumn is created, the default headerValue is null
So, the header ends up rendered as an empty label (probably of size 0 if the JTable computes its header size based on the renderer's preferred size).nitpicking (can't resist - the alternative is a cleanup round in some not so nice code I produced recently <g>):
- it's not the JTable's business to compute its headers size (and it doesn't, the header's the culprit.) *> - the header should never come up with a zero (or near-to) height: even if there is no title shown, it's still needed as grab to resize/move the columns. So I would consider this sizing behaviour a bug.*
- furthermore, the "really zero" height is a longstanding issue with MetalBorder.TableHeaderBorder (other LAFs size with the top/bottom of their default header cell border) which extends AbstractBorder incorrectly. That's easy to do because AbstractBorder itself is badly implemented
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6459419
Thanks for the opportunity to have some fun :-)
JeanetteNo problem, thanks for the insight :) -
How to add custom columns with BO data from GP to UWL
Hi
We have CE 7.1 in our project UWL taskitems only have GP workflow tasks.
In UWL we can see that by default there are standard columns but now we need to add custom columns with data from ours BO associated to process instance
For that we need to develop one custom connector for UWL where we can retrieve the values from custom conenctor to UWL.
Currently our NWDS 7.1 does not have plugins for UWL Connector can anybody tell me where can I download this plugins?
thanks in advance!
Regards
CristianHi,
plz refer the following link
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0ee5047-c7a0-2a10-70b7-9557e3e4d440
Regards
Manohar -
I have a team site collection and I want to add a new App of type Issue Tracking list. so I did the following:-
From the site collection I created a new App of type issue tracking.
Then from the site collection I created a new Content type named “CustomIssue” which has its parent as “Issue” content type.
I went to the Issue tracking list and I changed the default content type from Issue , to the new “CustomeIssue” content type.
I open the site collection using SP designer and I created a new Create form for my Issue tracking list based on the "CustomIssue" content type and I select to have the Create form as the default form when creating an item.
Everything till this point worked well. But when I open the “customIssue” content type , and I re-order the columns and I hide some columns, this was not reflected inside the custom Create form …
although when using the default content type and the default create form you can control the order of the fields and to specify if certain fields hold be hidden inside the Create form.. so can anyone advice on this please?Hi,
According to your post, my understanding is that you lost the ability to order and hide site columns if i use custom content type with a custom Create Form.
I try to reproduce the issue, the result is the same as yours.
As a workaround, if I modify the custom content type form the site setting, and then change the NewForm as the default form, it will change the column orders.
However, if I use the new created form as the default form, it will remain the original orders.
I recommend that you modify the custom content type form the site setting, and then reset the NewForm as the default form.
The result is as below:
Best Regards,
Linda Li
Linda Li
TechNet Community Support
ok thanks for the explanation ,, but what if i want to change the order and hidde some fields in the future ,, do i have to chnage the defualt create form again ... -
How to Create Custom Content Type with 100 site columns ?
Hi EveryOne,
i have one requirement to create custom conten types in sharepoint 2013 as follows.
1. Create a content type with 100 site columns ( in this 100 site columns includes 10 mms feilds and 10 lookup fields).
2.when we deploy the content type in other server if already the same content type existing in the server it should be upgrade the existing content type.
Please advise how do develop the solution ( using power shell script or visual studio with event receiver or xml file)
Regards,
SrinivasTry below:
http://www.mindfiresolutions.com/Add-Columns--Fields-Programmatically-to-a-SharePoint-List-282.php
using(SPSite
oSPsite = new SPSite("http://Web-URL"))
oSPsite.AllowUnsafeUpdates =
true;
using (SPWeb oSPWeb = oSPsite.OpenWeb())
oSPWeb.AllowUnsafeUpdates =
true;
/* get the SPList object by list name*/
SPList lst = oSPWeb.Lists["EmpList"];
/* create a Numeric field for EmpID */
SPFieldNumber fldEmpID = (SPFieldNumber)lst.Fields.CreateNewField(
SPFieldType.Number.ToString(),
"EmpID");
fldEmpID.Required =
true;
fldEmpID.DisplayFormat =
SPNumberFormatTypes.NoDecimal;
/* create a Text field for Name */
SPFieldText fldName = (SPFieldText)lst.Fields.CreateNewField(
SPFieldType.Text.ToString(),
"Name");
fldName.Required =
true;
fldName.MaxLength = 50;
/* create a Date field for Dob*/
SPFieldDateTime fldDob = (SPFieldDateTime)lst.Fields.CreateNewField(
SPFieldType.DateTime.ToString(),
"Dob");
fldDob.DisplayFormat =
SPDateTimeFieldFormatType.DateOnly;
/* create a Currency field for Salary */
SPFieldCurrency fldSal = (SPFieldCurrency)lst.Fields.CreateNewField(
SPFieldType.Currency.ToString(),
"Salary");
fldSal.Currency =
SPCurrencyFieldFormats.UnitedStates;
fldSal.DisplayFormat =
SPNumberFormatTypes.TwoDecimals;
/* add the new fields to the list */
lst.Fields.Add(fldEmpID);
lst.Fields.Add(fldName);
lst.Fields.Add(fldDob);
lst.Fields.Add(fldSal);
/* finally update list */
lst.Update();
oSPWeb.AllowUnsafeUpdates =
false;
oSPsite.AllowUnsafeUpdates =
false;
If this helped you resolve your issue, please mark it Answered -
On deleting an item, "Name" column of recycle bin is updating with data in one of the custom column instead of title field in SP 2013 Custom list.
Thanks, ChinnuHi,
According to your post, my understanding is that you want to update title field in recycle bin with other field value of the item.
We can use the ItemDeleting Event Receiver to achieve it.
While item is deleting, replace title field value with other field value using ItemDeleting event receiver, then in the recycle bin, the title value will replace with other field value.
However, there is an issue while restore the item from the recycle bin, the item title would be replaced.
As an workaround, we can create a helper field in the list to store the title field value while deleting, then replace back while restoring using
ItemAdded Event Receiver.
I have made a simple code demo below to achieve this scenario, it works like a charm(the
Test2 field is the helper field, you can hide it in the list), you can refer to it.
public override void ItemDeleting(SPItemEventProperties properties)
properties.ListItem["Test2"]=properties.ListItem["Title"];
properties.ListItem["Title"]=properties.ListItem["Test1"];
properties.ListItem.Update();
base.ItemDeleting(properties);
/// <summary>
/// An item was added.
/// </summary>
public override void ItemAdded(SPItemEventProperties properties)
base.ItemAdded(properties);
properties.ListItem["Title"] = properties.ListItem["Test2"];
properties.ListItem.Update();
Thanks & Regards,
Jason
Jason Guo
TechNet Community Support -
Document ID column not appearing on dispform.aspx
Hi, when activating this feature at site collection level, the column appears for new library views, but not for the,
dispform.aspx
I think this doesn't apply for newform and editform.aspx since you can't edit that part.
Now, we migrate this site from SharePoint 2007 to 2013, could it be that after migrating and activating this new feature, it can't update that form since that was migrated.
Any other thoughts?Nope. you're stuck. That's the way it is. Two possible solutions:
Modify the dispform.aspx to include this. Kinda difficult though now that the page View has been dropped from SharePoint Designer 2013. You'll have to work in code view only.
Add a new column. Create a workflow that is triggered on change that copies the ID value to the new column. Display the new column on the dispform.aspx.
General
Maybe you are looking for
-
How do I wipe a file on OS 10.6.8?
-
Hello, I am confused. I just popped a brand new 500GB drive in my MDD for storage, but Disk Utility saw it as a 31GB drive, so i put it in a FireWire enclosure and formatted it at 500GB on my MBP, then popped it back in the MDD and the Finder now see
-
I was wondering if anyone has an idea on how to search a document for pages without bookmarks? I have a client that has a need for this and have not been able to come up with a way (other than visiting every page manually) to quickly determine this.
-
Now can't send texts as usual after receiving 1st iMessage
someone just sent me an iMessage (my first). Now I can't send a normal text. When I try to type in a message as usual, my keystrokes don't make anything happen now. What can I do?
-
Print Credit for returns Document through My report
Hi, I have a credit note / debit note print zreport. This report is picking data from BKPF, BSEG tables. Also report are using logical data DD - Customer Debit Note number like 500368 and DG - Customer Credit Note Number like 100506, that is printing