Problem: One user is seeing all folders, subfolders and files (all flattened out) on the all documents view (public view).
Solution: Go to 'Tools' -> 'Internet Options', and delete all the temporary files. Might have to do it manually by going to 'Settings' under browsing history and click on 'view files'.
Showing posts with label SharePoint 2007. Show all posts
Showing posts with label SharePoint 2007. Show all posts
Wednesday, June 26, 2013
Tuesday, April 30, 2013
Using webpart in masterpage generates error on subsites
Using a dataview webpart in a masterpage created the following error on subsequent subsites:
Resolution: Add the following parameter (in green) in the <SelectParameters> section:
<SelectParameters>
<asp:Parameter Name="ListName" DefaultValue="Tasks" />
<asp:Parameter Name="WebID" DefaultValue="RootWeb" /> </SelectParameters>
“Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Windows SharePoint Services-compatible HTML editor such as Microsoft Office SharePoint Designer. If the problem persists, contact your Web server administrator.”Reason: Subsite doesn't have that list specified on the webpart and doesn't know to look at the root.
Resolution: Add the following parameter (in green) in the <SelectParameters> section:
<SelectParameters>
<asp:Parameter Name="ListName" DefaultValue="Tasks" />
<asp:Parameter Name="WebID" DefaultValue="RootWeb" /> </SelectParameters>
Wednesday, April 4, 2012
Error on SharePoint list: Invalid number value...
Got the following error while working on a list with BDC data columns:
Invalid number value. A number field contains invalid data. Please check the value and try again.Cause: On the database where the BDC is pulling data from, one of the columns was changed from type of Int32 to a String. Even though the xml definition file was updated accordingly, this error comes when you try to save the list item after picking a BDC item.
Resolution: Go to the list settings, click on the BDC column, uncheck the 'problem' column (i.e. the column that changed type), go back and the problem is gone. You can re-add the column back by checking it. Refresh. All the data will be refreshed and no more errors.
Monday, March 19, 2012
Expand the multiselect box in SharePoint
To make the multselect boxes larger, put the following code in a 'content editor web part' and set it to hidden. Adjust to your own needs.
//**********************************************************************
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('.ms-long select').parent('div').css('width', '320');
$('.ms-long select').css('font-size', 'xx-small');
$('.ms-long select').css('width', '100%');
});
</script>
//**********************************************************************
Wednesday, November 23, 2011
Custom form did not stick to list
A site owner customized a new form for a list. He then went into SharePoint Designer and went to list properties to set the form as the 'new item form'. When he clicked OK, the setting did not seem to be saved and reverted back to the original newform.aspx.
Solution: Under 'List Properties' -> 'Supporting Files' (4th tab), make sure the second drop down 'Content type specific forms' is set to 'item', then go and select the new customized form:
Solution: Under 'List Properties' -> 'Supporting Files' (4th tab), make sure the second drop down 'Content type specific forms' is set to 'item', then go and select the new customized form:
Wednesday, October 5, 2011
changes in the masterpage didn't show
Site owner reported that she was not able to get rid of the site title. She doesn't see the title, but others are still seeing it.
Solution: It happened that the default.master page was also keeping minor versions. Go to the master page gallery and publish a major version so the changes will show for all users.
Solution: It happened that the default.master page was also keeping minor versions. Go to the master page gallery and publish a major version so the changes will show for all users.
Thursday, May 19, 2011
Separating radio button selections into another row in SharePoint
Came across an interesting problem when an user requirement is to separate the radio buttons into two different rows in a form. Plus attaching some click events to both selections. It took me about 15 mins or so to figure out but I thought it was interesting. SharePoint renders the radio buttons together as something like this:
You can't simply move one as you would if you are using html. Thankfully, a little jQuery and a little css comes to the rescue. The solution is actually a real simple one. BTW, I did tried using just jQuery to move the the 2nd radio button down but the attached click event was lost somehow.
On to the solution. If you have a field with selections 'A' and 'B', you want to move 'B' to the next row, the jQuery line:
The after effect:
The attached events for each radio button also worked. You would need to update the left and top positions to fit your needs though.
<SharePoint:FormField runat="server" id="ff2{$Pos}" controlmode="New" fieldname="No_x0020_Knowledge" __designer:bind="{ddwrt:DataBind('i',concat('ff2',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@No_x0020_Knowledge')}" />
You can't simply move one as you would if you are using html. Thankfully, a little jQuery and a little css comes to the rescue. The solution is actually a real simple one. BTW, I did tried using just jQuery to move the the 2nd radio button down but the attached click event was lost somehow.
On to the solution. If you have a field with selections 'A' and 'B', you want to move 'B' to the next row, the jQuery line:
$("span[title='B']").addClass('positionB');of course the css:
.positionB{
position:absolute;
left:23;
top:355;
}
The after effect:
The attached events for each radio button also worked. You would need to update the left and top positions to fit your needs though.
Monday, February 28, 2011
access denied when clicking on an item with read access
Problem: In SharePoint 2007, user sees a list on the home page, the list of items are pull from an ordinary list. User clicks on any item on that list and gets access denied. Checked that authenticated users indeed have read access.
Solution: In the permission level, checked the 'read' permission, make sure the 'view application pages' is checked.
Solution: In the permission level, checked the 'read' permission, make sure the 'view application pages' is checked.
Tuesday, February 8, 2011
User get access denied with Excel services
Even though trusted location was setup in excel services, with the trust children checked.
Turns out the there is a difference between http://url/ and http://url.com/ etc. Trusted location has to be config with both.
Turns out the there is a difference between http://url/
Thursday, January 13, 2011
problem: multi text fields don't align on newform
Solution: on list settings, reset the number of lines on one/both fields to another number.
Monday, October 18, 2010
Update topnav "home" tab to contain default.aspx
go to all site settings and update the welcome page to contain default.aspx. view source will show that the site now has home tab as /sites/test/default.aspx.
Thursday, June 17, 2010
SharePoint local breadcrumb not showing
Problem: using the same master page, the local breadcrumb shows on some pages but not other sites/pages.
Upon digging, the no breadcrumb pages are in a folder instead of a doc library. Moving those pages to a doc lib and problem was solved.
Upon digging, the no breadcrumb pages are in a folder instead of a doc library. Moving those pages to a doc lib and problem was solved.
Thursday, April 1, 2010
Breadcrumb shows wrong url for a list
Came across this problem when i went in the list settings, the url on the breadcrumb shows the url of the web app instead of the url to the list itself.
Solution: it turns out on the list properties, it's missing the default view page. Go to SharePoint Designer, right click on the list to bring up the properties, under 'Supporting Files' tab, select the 'default view page'.
Solution: it turns out on the list properties, it's missing the default view page. Go to SharePoint Designer, right click on the list to bring up the properties, under 'Supporting Files' tab, select the 'default view page'.
Friday, February 12, 2010
Workflow showed 'stopped' for some users
I have a SPD workflow with a lookup to assigned to groups. The workflow will send send an email to the group and assign tasks to the gorup etc. For some users (all site col admins, WF runs w/o problems). For normal contributors, the workflow shows stopped after entering a record.
Solution: This is permission related. The user has to be able to see the group memberships. Go to 'site settings' -> 'People and Groups', go to each group and go to Group Settings to switch the 'Who can view the membership of the group?' to Everyone. The workflow will start the next time you enter a record.
Solution: This is permission related. The user has to be able to see the group memberships. Go to 'site settings' -> 'People and Groups', go to each group and go to Group Settings to switch the 'Who can view the membership of the group?' to Everyone. The workflow will start the next time you enter a record.
Monday, February 8, 2010
Filter between two dates using the DataView and jQuery
This is the second round of filtering between dates in a SharePoint DataView. With this version, you do not need to be using the filters from the Enterprise version. (I am using the Standard version for now so was forced to get this working....)
Step by Step Instructions:
1. Using SPD, create an asp.net page. Add in the web part to be filtered to the page.

2. Add 4 asp.net controls. I named them txtDate1, txtDate2 and alttxtDate1, alttxtDate2. Feel free to choose your own. Note: thanks to the views below, the txtDate1 and txtDate2 asp.net textboxes have to have the AutoPostBack attribute set to true. We will hide the latter two. (Now the reason for the latter two fields: After some digging, the filter takes the dates formatted as yy-mm-dd. We are in the US so we don’t want to display the date like this. Thus the use of alternate fields to pass in for processing, but display we’ll see the good display. >.< )
From Date:
<asp:TextBox runat="server" AutoPostBack="true" id="txtDate1" CssClass="right">
</asp:TextBox>
<asp:TextBox runat="server" id="alttxtDate1" CssClass="invis"/>
To Date:
<asp:TextBox runat="server" id="txtDate2" AutoPostBack="True" CssClass="right"></asp:TextBox>
<asp:TextBox runat="server" id="alttxtDate2" CssClass="invis"/>
3. Select the WebPart and convert it to XSLT dataview. We will filter using the two dates on the dataview.
4. Setup the dataview parameters:

5. Setup the filter on the DataView using the parameters from step 4:

6. Add the jquery stuff to make it work:
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/ui-lightness/jquery-ui.css"
type="text/css" media="all" />
<script type="text/javascript">
if(typeof jQuery=='undefined'){
var jQPath="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/";
document.write('<script src="',jQPath,'jquery.min.js" type="text/javascript"><\/script>');
}
</script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"></script>
<SCRIPT type=text/javascript>
$(function() {
$("#txtDate1").datepicker({altField: '#alttxtDate1', altFormat: 'yy-mm-dd'});
$("#txtDate2").datepicker({altField: '#alttxtDate2', altFormat: 'yy-mm-dd'});
});
</SCRIPT>
7. Result:

8. Of course, hide the latter two alt controls:
<style type="text/css">
.invis{
visibility:hidden;
width:30px;
}
</style>
and....Done!
Note: this could be extended to more filters. Just modify the DataView filters criteria....
Step by Step Instructions:
1. Using SPD, create an asp.net page. Add in the web part to be filtered to the page.

2. Add 4 asp.net controls. I named them txtDate1, txtDate2 and alttxtDate1, alttxtDate2. Feel free to choose your own. Note: thanks to the views below, the txtDate1 and txtDate2 asp.net textboxes have to have the AutoPostBack attribute set to true. We will hide the latter two. (Now the reason for the latter two fields: After some digging, the filter takes the dates formatted as yy-mm-dd. We are in the US so we don’t want to display the date like this. Thus the use of alternate fields to pass in for processing, but display we’ll see the good display. >.< )
From Date:
<asp:TextBox runat="server" AutoPostBack="true" id="txtDate1" CssClass="right">
</asp:TextBox>
<asp:TextBox runat="server" id="alttxtDate1" CssClass="invis"/>
To Date:
<asp:TextBox runat="server" id="txtDate2" AutoPostBack="True" CssClass="right"></asp:TextBox>
<asp:TextBox runat="server" id="alttxtDate2" CssClass="invis"/>
3. Select the WebPart and convert it to XSLT dataview. We will filter using the two dates on the dataview.
4. Setup the dataview parameters:

5. Setup the filter on the DataView using the parameters from step 4:

6. Add the jquery stuff to make it work:
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/ui-lightness/jquery-ui.css"
type="text/css" media="all" />
<script type="text/javascript">
if(typeof jQuery=='undefined'){
var jQPath="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/";
document.write('<script src="',jQPath,'jquery.min.js" type="text/javascript"><\/script>');
}
</script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"></script>
<SCRIPT type=text/javascript>
$(function() {
$("#txtDate1").datepicker({altField: '#alttxtDate1', altFormat: 'yy-mm-dd'});
$("#txtDate2").datepicker({altField: '#alttxtDate2', altFormat: 'yy-mm-dd'});
});
</SCRIPT>
7. Result:

8. Of course, hide the latter two alt controls:
<style type="text/css">
.invis{
visibility:hidden;
width:30px;
}
</style>
and....Done!
Note: this could be extended to more filters. Just modify the DataView filters criteria....
Friday, August 14, 2009
infopath form quick note
Note: When a form has a dropdown from a reference list in SharePoint, changing the values of the reference list does NOT change the selected values in the existing forms....which is an excellent thing.
SSRS integration with MOSS notes
Some quick notes on integrating SSRS with MOSS. Using Sql 2005 SP2.
1. Configure Report Services BEFORE installing the add-in.
2. Must use the Reporting Services Configuration tool in Sql to configure the virtual directory. DO NOT use IIS.
3. If don't see the Reporting Services section in CA after installing the add-in, check and see if the Reporting Services site collection feature is enabled in the CA. Must login as a site collection admin for the CA to see this section.
1. Configure Report Services BEFORE installing the add-in.
2. Must use the Reporting Services Configuration tool in Sql to configure the virtual directory. DO NOT use IIS.
3. If don't see the Reporting Services section in CA after installing the add-in, check and see if the Reporting Services site collection feature is enabled in the CA. Must login as a site collection admin for the CA to see this section.
Thursday, April 30, 2009
Cannot delete content type from list
Problem: Added in a content type to a list and it's not letting me delete it. Says content type in use.
Soln: Modify the view of the list and see which item is using the content type. (Check the 'content type' column to have it in the view.) Then change the content type to some other one (perhaps 'Document'). After all the items are changed to a different content type, you can then delete the one that says in use.
Soln: Modify the view of the list and see which item is using the content type. (Check the 'content type' column to have it in the view.) Then change the content type to some other one (perhaps 'Document'). After all the items are changed to a different content type, you can then delete the one that says in use.
Friday, April 3, 2009
Alerts setup findings
For users to see their own alerts on "My Settings", they must have at least READ access.
With READ access, they see the "alert me", but when they click on "alert me", it gives "access denied".
With anonymous access turned on, everyone can read. However, if user is not in read access category, user will NOT get the alert.
With READ access, they see the "alert me", but when they click on "alert me", it gives "access denied".
With anonymous access turned on, everyone can read. However, if user is not in read access category, user will NOT get the alert.
Tuesday, March 24, 2009
Generate Unique ID for InfoPath form
We are going to generate a Unique ID for each InfoPath form using a SharePoint list. We will then use this ID as the unique filename.
1. Create a SharePoint list with a key column:

2. Each time we load the InfoPath form, we will grab the key and then increment the key by 1:
XPathNavigator xNav = MainDataSource.CreateNavigator();
XPathNavigator nodeTermid = xNav.SelectSingleNode("my:myFields/my:TermID",
NamespaceManager);
if (nodeTermid.InnerXml == "0")
{
string termid = getTermID();
nodeTermid.SetValue(termid);
….
}
private string getTermID()
{
string termSite = ConfigurationManager.AppSettings["url_termsite"].ToString();
string termIDListName = ConfigurationManager.AppSettings["list_termid"].ToString();
string termIDKey = string.Empty;
SPSite mysite = null;
SPWeb site = null;
try
{
mysite = new SPSite(termSite);
site = mysite.RootWeb;
site.AllowUnsafeUpdates = true;
SPList list = site.Lists[termIDListName];
SPQuery query = new SPQuery();
string queryText = "<Where><Eq><FieldRef Name='{0}'" +
"/><Value Type='Text'>{1}</Value></Eq></Where>";
queryText = string.Format(queryText, "Title", "termid");
query.Query = queryText;
SPListItemCollection results = list.GetItems(query);
foreach (SPListItem item in results)
{
termIDKey = item["key"].ToString();
}
int newID = Convert.ToInt32(termIDKey) + 1;
UpdateFieldValues(termIDListName, "key", newID.ToString(), "Title", "termid");
return termIDKey;
}
catch (Exception ex)
{
throw ex;
}
finally
{
if (mysite != null) mysite.Dispose();
if (site != null) site.Dispose();
}
}
public static void UpdateFieldValues(string listName, string attribute, string attrValue,
string filterField, string filterValue)
{
SPSite mysite = null;
SPWeb site = null;
try
{
mysite = new SPSite(ConfigurationManager.AppSettings["url_termsite"].ToString());
site = mysite.RootWeb;
site.AllowUnsafeUpdates = true;
SPList list = site.Lists[listName];
SPQuery query = new SPQuery();
string queryText = "<Where><Eq><FieldRef Name='{0}'" +
"/><Value Type='Text'>{1}</Value></Eq></Where>";
queryText = string.Format(queryText, filterField, filterValue);
query.Query = queryText;
SPListItemCollection results = list.GetItems(query);
foreach (SPListItem item in results)
{
item[attribute] = attrValue;
item.UpdateOverwriteVersion();
}
}
catch (Exception ex)
{
throw ex;
}
finally
{
if (mysite != null) mysite.Dispose();
if (site != null) site.Dispose();
}
}
1. Create a SharePoint list with a key column:

2. Each time we load the InfoPath form, we will grab the key and then increment the key by 1:
XPathNavigator xNav = MainDataSource.CreateNavigator();
XPathNavigator nodeTermid = xNav.SelectSingleNode("my:myFields/my:TermID",
NamespaceManager);
if (nodeTermid.InnerXml == "0")
{
string termid = getTermID();
nodeTermid.SetValue(termid);
….
}
private string getTermID()
{
string termSite = ConfigurationManager.AppSettings["url_termsite"].ToString();
string termIDListName = ConfigurationManager.AppSettings["list_termid"].ToString();
string termIDKey = string.Empty;
SPSite mysite = null;
SPWeb site = null;
try
{
mysite = new SPSite(termSite);
site = mysite.RootWeb;
site.AllowUnsafeUpdates = true;
SPList list = site.Lists[termIDListName];
SPQuery query = new SPQuery();
string queryText = "<Where><Eq><FieldRef Name='{0}'" +
"/><Value Type='Text'>{1}</Value></Eq></Where>";
queryText = string.Format(queryText, "Title", "termid");
query.Query = queryText;
SPListItemCollection results = list.GetItems(query);
foreach (SPListItem item in results)
{
termIDKey = item["key"].ToString();
}
int newID = Convert.ToInt32(termIDKey) + 1;
UpdateFieldValues(termIDListName, "key", newID.ToString(), "Title", "termid");
return termIDKey;
}
catch (Exception ex)
{
throw ex;
}
finally
{
if (mysite != null) mysite.Dispose();
if (site != null) site.Dispose();
}
}
public static void UpdateFieldValues(string listName, string attribute, string attrValue,
string filterField, string filterValue)
{
SPSite mysite = null;
SPWeb site = null;
try
{
mysite = new SPSite(ConfigurationManager.AppSettings["url_termsite"].ToString());
site = mysite.RootWeb;
site.AllowUnsafeUpdates = true;
SPList list = site.Lists[listName];
SPQuery query = new SPQuery();
string queryText = "<Where><Eq><FieldRef Name='{0}'" +
"/><Value Type='Text'>{1}</Value></Eq></Where>";
queryText = string.Format(queryText, filterField, filterValue);
query.Query = queryText;
SPListItemCollection results = list.GetItems(query);
foreach (SPListItem item in results)
{
item[attribute] = attrValue;
item.UpdateOverwriteVersion();
}
}
catch (Exception ex)
{
throw ex;
}
finally
{
if (mysite != null) mysite.Dispose();
if (site != null) site.Dispose();
}
}
Labels:
.NET,
InfoPath Forms Services 2007,
SharePoint 2007
Subscribe to:
Posts (Atom)

