SharePoint Designer 2010 MORH funkcija

Radim neko zapisnik gdje zaposlenici mogu zatražiti odmor, bolesno vrijeme, itd.. Jedan valjanosti pravilo zahtijeva da uvijek morate zatražiti pauzu u 4 sat intervalima.  To je jednostavno dovoljno za napraviti - koristiti modulu funkciju.  Modulo funkcija govori vam ostatak u ligi.  Ako ne postoji ostatak, modulo is zero, inače, it’s whatever is left.  Na primjer, 8 mod 4 = 0 (8 / 4 = 2 with no fraction).  S druge strane, 8 mod 5 is 3.

I needed to do this once with SPD 2007 once upon a time and I actually ended up using an InfoPath form to solve, so it was handled on the front end at the time.  In the current case, there may be an InfoPath form in the picture, but that’s not clear yet.  Tako, I was working out a technique to ensure that time requests are always in 4 hour increments.  I was going to do the math, save it in a string and then do some substring stuff. 

I pull up SPD 2010 and to my surprise (and a little embarrassment) there is a modulo function already:

image

I am once again pleasantly surprised that something I needed is already there out of the box.  It does seem like a weird function for Microsoft to include in the mix.  It has a sort of “this is easy, so let’s throw it in” feel to it.  I sympathize with that, as I do it myself all the time.  This CodePlex project has a bunch of little functions that result from the ItsEasy principle.  Istovremeno, Microsoft continues to support evidence the “95% of the way” effect with the product.  They implement the Mod function, but not the round function, for instance.

</kraj>

Pretplatite se na moj blog.

Slijedite me na Twitter-u http://www.twitter.com/pagalvin

Jedna misao o „SharePoint Designer 2010 MORH funkcija

  1. Pingback: Tweets that mention SharePoint Designer 2010 MOD function « Paul Galvin's SharePoint Space -- Topsy.com

Dopust jedan Odgovor

Vaša email adresa neće biti objavljena. obavezna polja su označena *