All Inline Functions in SourceCode.Workflow.Functions

New in K2 4.5 are Inline Functions!  In this post, you’ll find a list of all the inline functions and description from the SourceCode.Workflow.Functions assembly. Which is the assembly that we get with our K2 installation.

This blogpost is part of a post on inline functions and only for reference!

Text
Find Returns the index if the specified string is found within another string. Returns 0 if no match can be found.
Contains Returns a true value if a substring is found within another string.
Left Returns a subset of characters from the left side of a string.
Right Returns characters from the right side of a string.
Mid Returns a subset of characters from a string, starting at a specified index and continuing to the end of the string.
Mid Returns a subset of characters from a string, starting at a specified index and continuing a specified length.
To Lower Converts a string to lower case.
Length Returns the length of a string.
To Upper Converts a string to upper case.
Proper Converts a string to proper case.
Replace Replaces a substring within a string with a new substring.
Trim Removes leading and trailing spaces and line breaks from a string.
Split Splits text into substrings delimited by a specified separator value.
Join Concatenates a list of text values or fields, delimiting each with a separator.
Pad Left Pads a string with a padding character on the left side up to a specified length.
Pad Right Pads a string with a padding character on the right side up to a specified length.
Insert Inserts a substring into a string at a specified position.
URL Encode Encodes a URL string.
URL Decode Decodes a URL string.
Mathematical
Power Gets one value raised to the power of another.
Power Gets one value raised to the power of another.
Square Gets the square of a number.
Square Gets the square of a number.
Square Root Gets the square root of a positive number.
Square Root Gets the square root of a positive number.
Root Gets the positive nth root of a positive number.
Root Gets the positive nth root of a positive number.
Absolute The real number for which to get the absolute value.
Absolute The real number for which to get the absolute value.
Maximum Gets the maximum value of a list of values.
Maximum Gets the maximum value of a list of values.
Minimum Gets the minimum value of a set of values.
Minimum Gets the minimum value of a set of values.
Random Gets a random number less than or equal to a specified maximum value.
Random Gets a random number less than or equal to a specified maximum value.
Random Between Gets a random number between or equal to two specified values.
Random Between Gets a random number between or equal to two specified values.
Round Rounds a number up or down to a value with a specified precision.
Round Up Rounds a value up.
Round Down Rounds a value down.
Average Calculates the average of a collection of values.
Average Calculates the average of a collection of values.
Sum Gets the sum of a set of values.
Sum Gets the sum of a set of values.
Format Number Formats a number to a text representation using a specified numeric format specifier.
InfoPath
Get Attachment Content Gets an attachment’s file content from an array of bytes.
Get Attachment Name Gets an InfoPath attachment’s filename from an array of bytes.
Set Attachment Creates an InfoPath attachment and returns it as a base-64 string.
Lists
First Item Gets the first value in a list.
Last Item Gets the last value in a list.
Count Counts the number of items in a list of values.
Text
Hyperlink Creates a hyperlink with a display name and URL.
Date and Time
Today Gets the current day.
Yesterday Returns yesterday’s date.
Tomorrow Return tomorrow’s date.
Maximum Gets the maximum date and time from a list of values.
Minimum Gets the minimum date and time from a list of values.
Add Days Adds a specified number of days to a date.
Add Hours Adds a specified number of hours to a date and time.
Add Minutes Adds a specified number of minutes to a date and time.
Add Seconds Adds a specified number of seconds to a date and time.
Day Difference Determines the number of days between two dates, and hours are decimal fractions.
Day Gets the day of a given date.
Month Gets the month of a given date as a number.
Now Gets the current date and time.
Subtract Days Subtracts a specified amount of days from a date.
Subtract Hours Subtracts a specified amount of hours from a date and time.
Subtract Minutes Subtracts a specified amount of minutes from a date and time.
Subtract Seconds Subtracts a specified number of seconds from a date and time.
Weekday Gets the name of the day of the week from a specified date.
Week Number Gets the week number of the year of a specified date.
Year Gets the year of a date.
Format Date and Time Formats a date and time to a text representation using a specified date and time format.
Start of Year Gets the first day of a year.
End of Year Gets the last day of a year.
Start of Month Gets the first day of a month.
End of Month Gets the last day of a month.
Start of Week Gets the first day of a week.
End of Week Gets the last day of a week.
Start of Quarter Gets the first day of a quarter.
End of Quarter Gets the last day of a quarter.
Start of Year Gets the first day of a year.
End of Year Gets the last day of a year.
Start of Month Gets the first day of a month.
End of Month Gets the last day of a month.
Start of Week Gets the first day of a week.
End of Week Gets the last day of a week.
Start of Quarter Gets the first day of a quarter.
End of Quarter Gets the last day of a quarter.
Quarter Gets the quarter number a specified date is in.
Logical
If Returns one of two values based on a Boolean condition. Nested expressions are allowed.
True Gets the Boolean value of true.
False Gets the Boolean value of false.
Yes Gets the Boolean value of true.
No Gets the Boolean value of false.
And Performs an And operation on two Boolean values, returning true if both values are true, false if any value is false.
Or Performs an Or operation on two Boolean values, returning true if one of the values is true, false if both values are false.
Xor Performs an Exclusive Or operation on two Boolean values, returning true if one and only one of the values is true.
Not Returns a true value if the condition evaluates to false and a false value if the condition evaluates to true.
Conversion
To Decimal Converts a value to a Decimal data type.
To Boolean Converts a value to a Boolean data type.
To Long Converts a value to a Long data type.
To Integer Converts a value to an Integer data type.
To Short Converts a value to a Short data type.
To Double Converts a value to a Double data type.
To DateTime Converts a value to a DateTime data type.
To String Converts a value to a String data type.
To Base-64 String Converts an array of bytes to a base-64 encoded string.
To Binary Converts a base-64 encoded string to an array of bytes.
To Bytes Converts a string to an array of bytes using the default character encoding.

SharePoint Connection 2010 NL – Day 2

After the post from day 1, the post of day 2 couldn’t really be left behind. So here’s my take on the sessions I went to see.

SharePoint Connection NL 2010

SharePoint Connection NL 2010

MSOL06: Nintex Workflow 2010: Extending 2010-Era SharePoint Workflow to End User and Enterprise Needs Alike by Mike Fitzmaurize

As a K2 insider it seemed weird going to the Nintex session, but I went to see what they have to offer as it is always good to keep an open mind. I’ve already seen Nintex a while ago but now they showed its integration in SharePoint 2010. Mike is a nice speaker and listening to him was good, I also think nobody noticed that the workflow he build couldn’t actually start and he didn’t return to fix it. But then again, he was working on an alpha build of Nintex. Nintex still runs on the SharePoint WF, you can either see this as an advantage or a disadvantage. Also, the integration with backend systems is done via wizards. Nintex has a lot of those which makes the out of the box package product pretty complete. If I look at K2 from that perspective, it’s able to integrate with SmartObjects and more generic solutions which allow for more flexibility.

MSC11: SharePoint 2010 Search by Richard Taylor

Richard Taylor about to start

Richard Taylor about make people smile!

Yesterday I really enjoyed listening to Richard, when I saw he did a functional session on Search, I was curious and went for it. The session had a lot of information on what search actually is. And that search is not actually what you want to do, you want to FIND things. This al leaded into explaining what Findability is and what you need to do for it. Interestingly, it wasn’t SharePoint that provided the solution according to Richard. He says if you have a mess that using SharePoint will not solve the problem, you need to structure your data and an Information Architect is crucial to get Search working correctly and make things findable. This was a valuable lesson and enjoyable to listen too, the hour flew by and everybody left with things to think about in the next SharePoint project.

MSC27: Claims-based identity in SharePoint 2010 by Spencer Harbar

I expected a lot from this session, but it didn’t really deliver. Partly because there was no demo but only slides and a lot of theoretical stuff on the claims based identity framework (Geneva).

The session did hold a lot of good content which is way too much to sum up here. It was important to note that with claims based authentication you’re not always able to eliminate Kerberos, this is because the backend system needs to be claims based aware, which some systems are simply not (yet). When you want to use Kerberos, you’ll need to use claims based authentication within SharePoint, which (from my understanding) will be able to create a windows identity and authenticate via Kerberos.

I really like the claims based authentication and really want to start working wit hit and try some different scenarios.

Spencer also noted that claims based identity (currently) only works with MSIE8. I presume that’s for the claims based identity to work as if it’s integrated authentication. So for older browsers we’ll probably see forms based authentication that uses claims based identification.

UPDATE: Spencer commented to this article about the browser requirements. He also provided some tweets:

http://twitter.com/harbars/status/8318105648

http://twitter.com/harbars/status/8318666635

http://twitter.com/harbars/status/8318676296

http://twitter.com/harbars/status/8318716190

SharePoint Connection NL 2010

Ask the experts area

MSC31: SharePoint UI Customizations by Marianne van Wanrooij

This session was a ‘redeploy’ of the session already held in Las Vegas. Marianne made her own demo’s, which was good to see.

JavaScript, Status bar and Notifications

SharePoint has a nice feature called JavaScript on demand, which only gets the JavaScript if needed. This allows for a small size of the basic page that requests the correct JavaScript when you need it.
After this, Marianne showed how the status bar and the notification area can be manipulated using JavaScript and the server client object model.

Ribbon

The ribbon is also extendable in SharePoint 2010, it allows you to add and remove buttons using a SharePoint feature which gives you very tight UI integration with SharePoint. The ribbon is actually one big image which is cut up by CSS. This is a very efficient technique that eliminating callbacks to the server. In the demo, a button was added to the ribbon and some simple code was run.

Dialog framework

The dialog framework was also part of the demonstration. There is not much to tell about it (which is a good thing!). You can open a dialog and provide it a URL to use as a page. The dialog framework hides all the html elements with the ‘s4-notdlg’ css class. This allows you to use one page for dialogs and for normal pages!

MSC30: Advanced Web Part Development by Jan Tielens

Jan Tielens about to start

Jan Tielens ready to rock!

I can’t help saying it again, Jan Tielens his presentations and demo are super to see! They simply work and are so clear. He makes it look way to easy!
The session covered topics on web part development in SharePoint 2010. There are some new things, like XSS Safeguards which are important to know about as a developer. A big improvement is the Virtual Web Part. For me, that’s nice to see, but I don’t understand why it was so important to drag and drop UI elements.  Apart from that, Jan showed how you can use the visual web part to create connect web parts. After that he went on and made two connected web parts update with Ajax.

Conclusion

I enjoyed the SharePoint Connections conference, although a lot of it was already known from Las Vegas, it still added knowledge for me. For me, that’s the most important part of going to a conference. Apart from that, it was nice to see all the SharePoint people again and shake some hands!

http://twitter.com/harbars/status/8318676296

SharePoint Connection 2010 NL – Day 1

On the 18th of January, Microsoft Events organized a SharePoint Connection in the Amsterdam RAI. In this blog post I’ll post on the sessions I went to see. These are my notes and not a full report on the sessions.

Keynote by Matthijs Hoekstra and Mike Fitzmaurice

The keynote started with the nice promotional video that was also shown at the SharePoint Conference in Las Vegas back in October. It’s a nice movie with lots of fast moving images and music, good to wake up and get you in a good mood. Matthijs Hoekstra kicked of the keynote by introducing Mike Fitzmaurice.  Mike is always a good speaker and he told a story how SharePoint 2010 came to be as it is now. Starting in the pre-2001 age, Mike probably knows most about the revolution SharePoint has made. Although the story was nice to hear, it wasn’t what I expected from the keynote, as I expected a bit more ‘power-talk’. But then again, do we still need that?

MSC34: Implementing Multi-Lingual Solutions on SharePoint 2010 by Spencer HarBar

I’ve never done anything with Multi-lingual sites in SharePoint 2007. Spencer gave a good overview of what it is and when/how variations come into play when doing multi-lingual sites. The important message was to plan up front because turning on variations has a large impact on your SharePoint site, site collection and even farm.

Language packs

Language packs provide the SharePoint chrome in a different language, this makes the ribbon and menus (site actions, etc) show in a different language. These language packs basically provide site templates in different languages. After the installation of a language pack, you must rerun the configuration wizard. If you install multiple language packs, you only have to run it at the end of the process once.

Variations

Variations are there to provide your content in a different way. This also means that site targeting mobile devices are actually a variation too. It’s just shown in a different way. The same principle applies to languages. It’s the same site provided in a different language. There is always a Variation Source, which is where you place the initial and original content. Posting or editing content can kick of a process to provision that content to the variation targets. The variation target gets a draft version so the translators can translate that document into the language required for that variation.
I’m pretty sure this content isn’t new for SharePoint 2010, but still nice to see when you’ve never done variations. Spencer did mention some new features in SharePoint 2010 like:

  • View changes editing the draft document shows you the original and new version which makes editing easy.
  • The process that copies the documents from Variation Source to Variation Target has changed and is now more configurable.
  • Sites can have an alternative language, which makes it possible to have the chrome of SharePoint shown in a different language without having to create a variation of it.

MSC33: Understanding the Service Application Architecture of SharePoint 2010 by Richard Taylor

This talk was about the new Service Application infrastructure which has completely been changed in SharePoint 2010. The room was packed so I was happy to get a seat, near a wall socket even :-)

In SharePoint 2007 there is one SSP that hosted services which sites could use. This is a monolithic design meaning that every service you need is hosted within that same SSP. In SharePoint 2010, this has all been changed and you can now run Services separately and only enable what you really need.

This changes a lot, it makes these services more secure because they can be run under different users and application pools, but it also makes things way more complex. For instance, every services uses its own database, this means that database management has become more complex. But also in terms of architecture, which site needs what service? Also note that some service application can be shared between farms, and some can’t be shared.

For every service application a proxy is created, so all the clients (features, webparts, etc) that need to request information from a service do that using a proxy.

I enjoyed Richard’s session a lot because it made me laugh when we got to the point about upgrading from SharePoint 2007 to SharePoint 2010. He basically says you should not do that unless you have a very simple site. The way this was told was pretty funny. It also made lots of people unhappy, but I think they didn’t notice until they walked out, as the session was funny, entertaining and informational!

MSC01:  ECM for the Masses by Erica Toelle

I’ve been to ECM for the masses at the Las Vegas conference, so I didn’t expect a lot of new stuff. The session covert most of the same topics but more from a business perspective. It showed the new capabilities of the metadata services and the document management features SharePoint 2010 has to offer (Unique document ID, Document sets, etc).

In general I really like this presentation but not having a live environment and using movies to show wasn’t helping a lot. I think the presentation was good and Erica is nice to listen to but would rock if there was a live environment.

I was impressed by the last demo. It showed how you can change where SharePoint stores its blobs of data using configuration in SQL server. After that, a PowerShell script was used to import a directory structure into a SharePoint document library and create shortcuts on the FileSystem to keep the documents in place for the end user. SharePoint 2010 routed the document (based on metadata) to the correct folder in a SharePoint list. I was impressed!

Update: Erica commented on this post (thanks!). Her VM wasn’t working correctly so the video’s used where a backup!

MSC06: Client-Side Technologies in SharePoint 2010 by Jan Tielens

This session covered the 3 new client side object models available to the developer.

The Client OM

In the past, when coding a client side application you could only talk to the SharePoint web services which really wasn’t very nice to do. The new client side OM allows you to request and manipulate information using a normal .NET API on the client. You’ll use the ClientContext object to query SharePoint 2010 in a very efficient way. An example showed it getting information from a list. You can specify which columns you need and that makes the result set very small and efficient to transport over the network.

ECMAScript

This is the JavaScript version of the client side OM. It has all the benefits of the Client OM, but uses JavaScript. This will primarily help you create AJAX functionality that interacts with SharePoint data. The OM is also efficient using the same mechanism as the Client OM. I liked that Jan also dropped in some jQuery which is something more Developers should do and learn. But I guess that even counts for basic HTML and CSS skills.

Silverlight client OM

This is basically the same as the previous two, only in Silverlight. This Works very nice and very efficient.
Read you can, efficient the client OM’s are (joda talk)! Apart from the microphone problems this was a very nice session with a well prepared and worked out demos. Jan is a very good presenter and I enjoyed the session, especially because Jan Tielens was the first trainer I ever had on a SharePoint course so he sort of introduced me to the thing.
Jan also showed the SPVSX extension which allows ‘quick deploy’ for your handy SharePoint 2010 development work.

Conclusion

A nice first day at the SharePoint Connections 2010. A lot of people complain about the content being a bit poor. I do agree a bit on that, but that’s mainly because I feel the demos are not prepared or working very well. Which I think eventually is a responsibility of the presenter, but I can’t help blaming that SharePoint 2010 is still beta.

WordPress Themes