Haaron Gonzalez Rotating Header Image

Consulting

Just make sure your Read List and Read Item operation in your ECT have the same fields

Had some fun during the weekend. Customer asked me to add 3 new fields to an existing External Contents Type hosted on a SharePoint 2010 farm. Simple right?

  • SQL Server
    • Modify the pre-production database and alter the table to create 3 new varchar fields
    • Add some dummy content to some records in pre-production farm
  • SharePoint Designer
    • Open the pre-production site collection and locate the External Content Type
    • Open the external content type look at the operations and update the fields including the new ones

After saving the changes I proceeded to test, and got an error, the view was not displaying the data and gave me a correlation ID, after running a Merge-SPLogFile powershell command this is what I got:

Error while executing web part: System.InvalidOperationException: The Finder ‘SiteCodesRead List’ cannot be found in ViewGroup associated with SpecificFinder (Read Item) operation ‘SiteCodesRead Item’ in EntityNamespace ‘http://preportal.zzzz.com/sites/it’, Entity ‘YYY_SiteCodes_IT_Master’.

What this wonderful error description was trying to tell me is:

Just make sure your Read Item and Read List operation in your ECT have the same fields you dummy

Will not charge the customer for the time I spent figuring out this issue

Formulas to get the first and last row on a repeating table in InfoPath

You know, you wake up knowing that is going to be a wonderful day working for a customer with the software products you love. During today on-site support session, you found out that is needed to write some good old XPath formulas on an InfoPath form.

There is a repeating table with the columns necessarily to describe travel information like Departure Date, Return Date, City, you named and the requirement was to expose the initial Departure Date and the last Return Date of the entire trip, so, what do we mean with entire trip? I maybe start a trip from San Diego to Mexico City, and then another trip from Mexico City to Seattle and then from Seattle to Las Vegas. Clearly, the Departure Date and Return Date are not associated with just one row “trip” in the repeating table because I have at least more than one row for describing all the trips.

The data structure of the repeating table is:

 

 

structure

So, here are the formulas to get the first and last row on a repeating table.

../my:TravelInfo/my:TravelInformation[count(preceding-sibling::my:TravelInformation) = 0]/my:DepartureDate

../my:TravelInfo/my:TravelInformation[count(following-sibling::my:TravelInformation) = 0]/my:ReturnDate

Fortunately, the approach work as a charm. No C# code saved the day today. Pure old good XPath did it. InfoPath, you are definitely the sunshine of my love, especially now that you will be supported until 2026 baby.

 

SharePoint pushed to its limits

championsHave you been interested in knowing how intranets get together? Or what practices teams follows in order to design/build/deploy and support an enterprise intranet? I did had the question too, and one of the resources I have been following for a couple of years now is the Nielsen Normal Group Intranet Design Award. This is a competition conducted by the Nielsen Norman Group called annual intranet design to identify the world’s 10 best intranets.

In this report you can see very interesting topics that will definitely give a broader idea on what it takes to build and deploy a top notch intranet. As a SharePoint consultant this also makes sense to review because you can see some real world SharePoint implementations, ideas, trends, features and approaches that maybe you didn’t know were possible.

Be aware that the report is not free, you need to pay for a licensed copy.

Congrats to BrightStarr for participating and winning this year!