Posts

Showing posts with the label wss

InfoPath 2007 Tips

To publish InfoPath forms to Sharepoint with time-stamped filenames: concat("Submission as at ", now()) as the filename in the publishing interface To develop using Tools for Office SDK for InfoPath, make use of these: System.Environment.UserName to derive the logged-in username; thisXDocument.Role to derive the roles; thisXDocument.ViewInfos["View Name"] to get to the appropriate view; thisXDocument.DOM.selectSingleNode to select nodes based on the full XML document; docActionEvent.Source.selectSingleNode to select nodes based on the event parameter; Use ActiveX component to derive the domain and username if not using tools for office. Use ActiveXObject("Wscript.Shell") and the process environment. Calling web services from scripting code is not straight-forward and doing the same from the native InfoPath form without code is buggy! Monetary values should be dealt with using String instead of double as multiplication of double yields unexpected ...

SharePoint 2007 Tips

To display the username in a Title column Choose Default value as Calculated Value; Type in: =REPLACE(Me,1,FIND("\",Me),""); For Team Discussion to work Subject field is used only in the first article within the thread; A web-part would mainly use the Subject and Replies fields for listing; Threaded view – which displays only Threading – is the only useful view; To sort a list by the abbreviated month Create a choice type for month input ([Report Mth]). The values should be the abbreviated month (e.g. Jan, Feb, Mar, etc); Create a calculated column to assign a numeric month to the list; The formulae should be: =MONTH("01-"&[Report Mth]&"-"&1990); To find the difference between 2 dates Use the DATEDIF function on 2 date fields DATEDIF(d1 : Date, d2: Date, “D”) : Number Example: DATEDIF(dateColumn, [Today], “D”) To convert a text value (from InfoPath) to numeric Create a calculated column of numeric type Apply ...

Son of ....... SmartPart; Sharepoint & ASP.NET 2.0

Image
Admittedly, I don't really know much about Sharepoint Services (WSS): My experience has been mainly in the area of ASP.NET. All I really wanted to do was to write user controls for deployment in a Sharepoint site. However, setting up the development environment was a real torture! My setup is to be: Windows 2003 Std. Ed. SQL 2000 WSS 2.0 SP2 ASP.NET 2.0 SonOfSmartPart (to run user controls as webparts [ http://www.smartpart.info ]) For the most part, the installation of the operating system, database server and Sharepoint Services was a breeze. Hell began with ASP.NET 2.0... Upgrading the Sharepoint website to use ASP.NET 2.0 causes all the webparts to show "Web Part Error"! After ploughing through several posts, this was resolved by changing the trust level of the website. Web.config: <trust level="Full" originurl=""/> (Note that this is probably not appropriate for a "live" site; but heck, I'm only setting up a development site......