Tuesday, September 4, 2012

SharePoint Calculated Columns :: Complex String Field Calculations


This formula uses some xfields generated with the Workflow engine. Beware of Content approval and workflow as the new xfields will continue to set approval back to Pending.

="Room: "&xRoom&" at "&TEXT([Start Time],"h:mmam/pm")&" for "&TEXT(Length,"#0.00")&"hrs ["&TRIM([Whats Happening])&"] "&IF([Number of Students]>0,"Capacity: "&[Number of Students]&"People. This is a ","")&IF(xRecur="True","Repeating Booking-"," ONEOFF Booking")&" and is "&MID(xApproval,4,10)
=IF(xRoom="@COMMON",[Whats Happening],UPPER(MID(xRoom,1,5))&" | "&LOWER(MID(xWho,11,15))&" | "&UPPER([Booking Status])&" | "&TEXT([Start Time],"h:mmam/pm")&" | "&TEXT(Length,"#0.00")&" hrs | "&TRIM([Whats Happening])&" | "&IF([Number of Students]>0,[Number of Students]&" Pple.","")&IF(xRecur="True","| REPEATS"," | ONEOFF"))

No comments:

Post a Comment