I learned something new about exporting and importing a webpart in Sharepoint 2010.
Here's the scenario: I exported a form webpart from Sharepoint Designer. Once I imported it to my page, the page would throw this error of "file not found".
When I looked at the logs, it basically said, "there is no Web named http://...."
That lead me to open the exported webpart with NotePad ++ and there I found 5 references to a site path which included the domain name.
I whacked the domain name, leaving only the relative path, saved and imported the webpart again.
That resolved the error.
SharePoint Explorations
ex·plo·ra·tion |noun /ˌekspləˈrāSHən/ - to travel for the purpose of discovery. My journey with Microsoft SharePoint.
Sunday, November 18, 2012
Saturday, September 22, 2012
Finding the key to understanding Sharepoint
I liked this video as it attempts to enlighten us on the key to understanding SharePoint. I must say, when I attend conferences, there is actually starting to be a line in the Women's bathroom. So I don't know for how long Mark Rackley can get away with a talk like this, but there truth to his presentation with regards to understanding SharePoint.
Thursday, September 20, 2012
Demo of InfoPath 2010
Attending a Bootcamp immersion class and learning some very good things. Today's topic was InfoPath and I was impressed with the power of this tool. It seemed familiar to me as it reminded me of both designing with Dreamweaver and Ms Access forms.
I created a couple of videos using Jing to highlight what we learned today.
Part One details Replacing the Sharepoint New Form with an InfoPath Form (5 minutes)
Part Two details Using the Infopath Webpart on a Sharepoint 2 column page (5 minutes)
While I could only scratch the surface in this class, I want to learn more about InfoPath. Did you know you could do the following with InfoPath?
I created a couple of videos using Jing to highlight what we learned today.
Part One details Replacing the Sharepoint New Form with an InfoPath Form (5 minutes)
Part Two details Using the Infopath Webpart on a Sharepoint 2 column page (5 minutes)
While I could only scratch the surface in this class, I want to learn more about InfoPath. Did you know you could do the following with InfoPath?
- apply themes to the form
- create controls such as buttons, combo boxes, date pickers, and dynamic text in calculated values
- add in rules to offer a complex form by hiding fields based on form choices, making some field optional, etc
- display the form in a webpart on your webpage
Friday, February 17, 2012
Using Access Services with a Sharepoint Website
I did some experimenting with Access Services and Sharepoint (both Office 2010 versions). What I discovered was just how easy it was to publish an existing Microsoft database, complete with a form and macro events.
I started a blank database and created a very basic table called Products and based a form upon that table. I set the Display Form and Web Display Form to that new form, ProductsForm
Happy with my form, I followed these steps:
Before the Sharepoint site can reflect my changes, I need to sync the service. Do that by clicking the Sync button under the File menu of Access
Returning to mySite/OrdersManagement, I enter a record and click the button. There’s my message proving this event translates up to the Website.
Encouraged, I go on to add a delete button and attach the delete record command to the onClick event. Sure enough, this works and as a bonus, Microsoft adds the logic to confirm if a deletion is really desired.
I started a blank database and created a very basic table called Products and based a form upon that table. I set the Display Form and Web Display Form to that new form, ProductsForm
Happy with my form, I followed these steps:
- on the file tab, click Publish to Assess Services
- I entered a URL to my site as the server URL and gave entered the Site Name as OrdersManagement.
- When I clicked Publish, the new site was created and the database was published.
- I went to the url /Mysite/OrdersManagement and there was my form.
- I entered a record and clicked Save Record. A message was displayed
- Returning to my database, I see the record is now in my table
That’s pretty cool. But our database forms offer a lot of functionality, so I wondered if adding events to my form would translate up to the SharePoint site. My next experiment involved adding a button on the form and attaching a message box declaring “demo successful!” to the OnClick event.
Before the Sharepoint site can reflect my changes, I need to sync the service. Do that by clicking the Sync button under the File menu of Access
Returning to mySite/OrdersManagement, I enter a record and click the button. There’s my message proving this event translates up to the Website.
Encouraged, I go on to add a delete button and attach the delete record command to the onClick event. Sure enough, this works and as a bonus, Microsoft adds the logic to confirm if a deletion is really desired.
Wednesday, November 23, 2011
DVWP and Displaying Records Within a Specific Time Frame
Today I worked on a page which has a high bounce rate, frankly because it is not useful. It displayed more than 1000 records by paging through 25 records at a time.
The request I had was to display only 10 months worth of records - which would display a much more useful set of 47 records.
The page had a DVWP whose source was a SQL table. My adventure included tweaking the SQL select statement and initially adding an ORDER BY clause, but eventually opting not to use it and allow the DVWP to be sortable by the columns.
The biggest challenge I encountered was getting the syntax correct in the query while using the built-in filtering wizard of the dataview webpart.
I frequently ran into a roadblock with the generic SPD error message, "the server returned a non-specific error ..." whenever I tried to filter or sort. After much gnashing of teeth and clicking the undo button, I stopped using the wizard and went straight to the select statement.
.
Don't ask me why, but typing the ORDER BY clause into the statement works.
To get to the select statement, open your file in SharePoint Designer (SPD) and find the <Datasources> tag in the XSL code.

This is an edited version of the original SQL statement displaying all records - but it has all relevant parts.
<DataSources>
<SharePointWebControls:SPSqlDataSource runat="server" ... SelectCommand="SELECT TableName . OrderNumber , TableName . PublicationDate , TableName . ProjectNumber , TableName . ReportTitle , ... FROM TableName INNER JOIN TableName2 ON TableName . ProjectNumber = TableName2 . ProjectNumber " ID="Custom_x0020_Query2"></SharePointWebControls:SPSqlDataSource>
</DataSources>
To begin, I clicked the chevron to open the filter wizard.

The Filter Wizard is not going to give me the ability to say "display the records where the publication date is equal or less than 10 months from today".
But I picked a date from the Wizard so that I could look at the sql statement to get a clue about the syntax. That results in the following WHERE clause "WHERE [PublicationDate] >= '1/23/2011' " and reminds me to escape the greater than symbol for CAML.

That gets me my 47 records - but the date is hard-coded. Not what I want.
After some failed attempts to get the SQL syntax right, I reached for an expert at Experts Exchange.
That quickly yielded the correct solution: WHERE [PublicationDate] > DATEADD(MONTH,-10,getdate())" Which prompted me to read more about those SQL functions here:
http://www.electrictoolbox.com/date-add-sql-server-intervals-dates/
Now all that's left to do is see if the bounce rate improves on this page.
The request I had was to display only 10 months worth of records - which would display a much more useful set of 47 records.
The page had a DVWP whose source was a SQL table. My adventure included tweaking the SQL select statement and initially adding an ORDER BY clause, but eventually opting not to use it and allow the DVWP to be sortable by the columns.
The biggest challenge I encountered was getting the syntax correct in the query while using the built-in filtering wizard of the dataview webpart.
I frequently ran into a roadblock with the generic SPD error message, "the server returned a non-specific error ..." whenever I tried to filter or sort. After much gnashing of teeth and clicking the undo button, I stopped using the wizard and went straight to the select statement.
.Don't ask me why, but typing the ORDER BY clause into the statement works.
To get to the select statement, open your file in SharePoint Designer (SPD) and find the <Datasources> tag in the XSL code.

<DataSources>
<SharePointWebControls:SPSqlDataSource runat="server" ... SelectCommand="SELECT TableName . OrderNumber , TableName . PublicationDate , TableName . ProjectNumber , TableName . ReportTitle , ... FROM TableName INNER JOIN TableName2 ON TableName . ProjectNumber = TableName2 . ProjectNumber " ID="Custom_x0020_Query2"></SharePointWebControls:SPSqlDataSource>
</DataSources>
To begin, I clicked the chevron to open the filter wizard.

The Filter Wizard is not going to give me the ability to say "display the records where the publication date is equal or less than 10 months from today".
But I picked a date from the Wizard so that I could look at the sql statement to get a clue about the syntax. That results in the following WHERE clause "WHERE [PublicationDate] >= '1/23/2011' " and reminds me to escape the greater than symbol for CAML.
After some failed attempts to get the SQL syntax right, I reached for an expert at Experts Exchange.
That quickly yielded the correct solution: WHERE [PublicationDate] > DATEADD(MONTH,-10,getdate())" Which prompted me to read more about those SQL functions here:
http://www.electrictoolbox.com/date-add-sql-server-intervals-dates/
Now all that's left to do is see if the bounce rate improves on this page.
Tuesday, June 14, 2011
Improving the Hyperlink / Picture Column for Contributors
A recent article by Richard Harbridge, Powerful Columns You Probably Didn’t Know About, gave me an idea for improving my contributor's experience in linking to documents within lists in SharePoint MOSS 2007.
As it is right now, my contributor opens a new list item form, clicks attach and proceeds to fill out the form. When she gets gets to the form field, which is a "picture or hyperlink" column, it is a challenge to add the hyperlink to the attached document.
Since this is a new item, the path to the attachment is pointing to the local path of the document - so that won't work. She could save the item, then edit the item at which point the path is correctly available by either clicking on the link to the attachment and pasting it from the browser address bar or right clicking and viewing the properties of the attachment. None of that is very intuitive or seamless for the end user.
Here's the current columns in her list. There are three columns that could have a need for the contributor to add a hyperlink to a document.
The multiple lines of text columns will be replaced with a column type of "Full HTML Content with Formatting and Constraints for Publishing". The Hyperlink or Picture column will be replaced with a column type of "Hyperlink with Formatting and Constraints for Publishing".
She has a much easier time adding a hyperlink to her document by browsing rather than trying to copy/paste the link pointing to a list attachment.
I wish I had known about these publishing columns available to new site columns and used them rather than the standard list columns. It is going to take me a while to retro-fit several of my lists with these site columns, but in the long run, it is an improvement for both my contributor and me.
As it is right now, my contributor opens a new list item form, clicks attach and proceeds to fill out the form. When she gets gets to the form field, which is a "picture or hyperlink" column, it is a challenge to add the hyperlink to the attached document.
Since this is a new item, the path to the attachment is pointing to the local path of the document - so that won't work. She could save the item, then edit the item at which point the path is correctly available by either clicking on the link to the attachment and pasting it from the browser address bar or right clicking and viewing the properties of the attachment. None of that is very intuitive or seamless for the end user.
Here's the current columns in her list. There are three columns that could have a need for the contributor to add a hyperlink to a document.
This is the "View Presentation" column
Following Richard's advice, my solution was to create two new site columns. The multiple lines of text columns will be replaced with a column type of "Full HTML Content with Formatting and Constraints for Publishing". The Hyperlink or Picture column will be replaced with a column type of "Hyperlink with Formatting and Constraints for Publishing".
With these new site columns, when my contributor needs to type text and include a hyperlink, she can browse to the document.
She has a much easier time adding a hyperlink to her document by browsing rather than trying to copy/paste the link pointing to a list attachment.
The browse dialog box allows the contributor to upload the document if it doesn't already exist. It places the item here, /Presentations/Documents/Forms/AllItems.aspx, rather than in the list as an attachment. In my environment, that is not a problem and will also make it easier to replace a document if that was needed.
I wish I had known about these publishing columns available to new site columns and used them rather than the standard list columns. It is going to take me a while to retro-fit several of my lists with these site columns, but in the long run, it is an improvement for both my contributor and me.
Subscribe to:
Posts (Atom)










