Monday, March 12, 2012

The server returned a non-specific error when trying to get data from the data source

The server returned a non-specific error when trying to get data from the data source. Error in SPD when try to se the Data source of a SP list.
After long search i understood that the calculated field i have added caused this issue.
Initially i added a calculated field Close Date with DateTime data type.
=IF([Statuscolmn]="Closed",[ModifiedColmn],"NA")
or
=IF([Statuscolmn]="Closed",[ModifiedColmn]," ")
or
=IF([Statuscolmn]="Closed",[ModifiedColmn],) This solves the issue but it will insert 12/30/1899 for False condition and not acceptable in reports.

"The server returned a non-specific error..." message was thrown when the dataset returned to the dataview included a row with the calulated field was set to "" or NA. 

To solve this
convert the calculated field type to single line of text. And i changed the  Formula to

=(IF([Status]="Closed",TEXT([Modified],"mm/dd/YYYY"),"NA"))

this solved my issue.

Wednesday, February 29, 2012

Person fields (createdBy, ModifiedBy) field in XSLT

Created By  and Modified fields are shown as rich text in SPD.
If we convert to Text format we can see the html as below

<nobr><span><A HREF="/sites/home/_layouts/userdisp.aspx?ID=100">Rajesh Pillai</A><img border="0" height="1" width="3" src="/_layouts/images/blank.gif"/><a href='javascript:' onclick='IMNImageOnClick();return false;' class='ms-imnlink'><img name='imnmark' title='' border='0' height='12' width='12' src='/_layouts/images/blank.gif' alt='No presence information' sip='rajesh.pillai@live.com' id='imn_2225,type=smtp'/></a></span></nobr>

To customize these fields in xslt we need to write some extra steps
1. To get the Email address
<xsl:value-of select= 'substring-before(substring-after(@Author, concat("sip=",$dvt_apos)), $dvt_apos)' disable-output-escaping="no"/>

2. To show only the name
<xsl:variable name="Name" select="substring-before(substring-after(string(@Author),'&quot;&gt;'),'&lt;/A&gt;'"/>

Monday, February 13, 2012

Mr. Jayakanthan about foreign life

நான் வெளி நாடுகளுக்குப் போனதில்லை. அன்னியர் வீட்டில் நுழைந்து பார்த்து, "அங்கே அது இருக்கிறது; இது இருக்கிறது, நம்மிடம் அதெல்லாம் இல்லையே...' என்று, தம் வீட்டோடு ஒப்பிட்டு ஏங்கி, அங்கலாய்க்கும், அலையும் குணமே, வெளிநாடு சுற்றிப் பார்க்கும் பலரிடமும் நிறைந்திருப்பதாக, எனக்குத் தோன்றுகிறது.
வேடிக்கை பார்ப்பதற்காகச் சிலர் செல்கின்றனர். எனக்கோ, நம் வீதிகளில் நடக்கும் வேடிக்கைகளே, இன்னும் பார்த்துத் தீரவில்லை. புதுமைகளை ரசிப்பது எனில், என்னைத் தேடி வரும் ஒவ்வொன்றுமே, புதுமையாக இருக்கின்றன. கற்றுக் கொள்வதற்காக எனில், என்னைச் சுற்றி இருக்கும் மிகக் குறுகிய வட்டத்தில் கூட, நான் காணவும், கற்கவும், ஏராளமான விஷயங்கள் இன்னும் இருக்கின்றன.
ரஷ்ய எழுத்தாளர்களான கோகோல், புஷ்கின், தாஸ்தியேவ்ஸ்கி, டால்ஸ்டாய், துர்க்கனீவ் ஆகியோரின் படைப்புகளைப் படித்திருக்கிறேன். அவர்கள் நேசித்த ருஷ்ய ஆத்மா மிக உயர்வாக இருந்தது. அதன் காரணமாகவே, ரஷ்யாவை காண, நான் ஒருமுறை இசைந்தேன்.
நம் பெருமையை உலகு அறிவதற்காக, அதனால், உலகு பயன் உறுவதற்காக - ஒரு விவேகானந்தர் போல் நம்மால் போக முடியுமா?
அல்லாமல், லண்டனில் இட்லி - சாம்பார், கும்பகோணம் வெற்றிலை - சீவல் கிடைப்பதைப் பற்றி, கதை அளந்து, ஜப்பானிய, "கீய்ஷா' பெண்களைப் பார்த்து, "அப்பப்பா... அச்சச்சோ!' என்று வாய் பிளந்து, ஆச்சரியப் படுவதற்கும் தானா போக வேண்டும்!
சுங்க இலாகா சோதனை, வருமான வரி சர்ட்டிபிகேட், பாஸ்போர்ட், விசா, அறிமுகக் கடிதங்கள், இத்யாதி சங்கடங்களைத் தாங்கிக் கொண்டு, ஒரு சர்வதேச கைதி போல, இந்தச் சடங்குகளைச் சுமந்துகொண்டு, ஒவ்வொரு நாட்டிலும் ஏறியும், இறங்கியும், நான் சாதிக்கப் போவது ஏதுமில்லை என்று எனக்குத் தெரியும். நான் இருக்குமிடத்தில் தான், எனக்குச் சிறப்பு.
எங்கும், எல்லாரும் சுதந்திரமாகத் திரியும் காலம் வரும். அப்போது, எல்லாருக்கும் இந்த மோகம் குறையும். எனக்கு, இப்போது இந்த மோகம் இல்லை
— ஜெயகாந்தன் ஒரு கட்டுரையில்.

I like this... Vivekananda also came here, i am also living here... but what a himalayan difference.

Friday, February 10, 2012

Jquery UI -Autocomplete with Server side data

Good article
Example inside Document.ready
    $('controlname').autocomplete({
        source: function (request, response) {
            $.ajax({
                type: "POST",
                url: "pagename/methodname" , //"search.aspx/getClientNames"
                data: "{}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                // This explicitly disables any browser caching.
                dataFilter: function (data) { return data; },
                success: function (data) {
                    response($.map(data.d, function (item) {
                        return {
                            value: item
                        }
                    })) // response
                }, // success
                error: function (XMLHttpRequest, textStatus, errorThrown) {
                    alert(textStatus);
                }
            }); // ajax
        },
        minLength: 2
    });// autocomplete

Friday, February 3, 2012

Approaches to integrate ASP.NET web application into SharePoint

Good article here

  • SharePoint Application page approach
  • User control Approach
  • Web part page approach
  • Simple IFRAME approach

Friday, January 27, 2012

SharePoint Calculated field - Compare 3 Date columns

SharePoint Calculated field - Compare 3 Date columns
The logic
if ([Revised Due Date] = "")
set val = [Chartered Due Date]
else if([Chartered Due Date]="")
set val = [Requested Due Date]
else if([Requested Due Date]="")
set val =" NA")
the formulae
=IF(OR([Revised Due Date]<>"",[Chartered Due Date]<>"", [Requested Due Date]<>""), MAX([Revised Due Date],[Chartered Due Date]
,[Requested Due Date]), "NA")