08 Aug

Creating custom column with complex logic

Hello Readers,

I got following question from Chris Polek who happen to stumble upon my blog. I tried to answer it best of my knowledge but I am sure there can be multiple ways to achieve this. If you find a better solution, do comment!

Question:
I would like to create a column in a custom list that will sequentially assign the number 1, 2 or 3 to an item created in the list. After assigning a ’3′, it will start over at ’1′. Optionally, this could be a name as well, but a number will work just fine.

Would you be able to help me with this request?

Answer:
Interesting! You can do this by using a calculated column or by using a workflow.

Calculated column method:
You can base your logic with the help of ID column.
For e.g. If the id of the list item is 3 or 6 or 9 or if the sum of the digits is 3/6/9 then put the column value as 3
For e.g. If id =12 then 1+2= 3 hence you will print 3
If all above is false then if the id is even number then print 2 else print 1

If above logic seems complicated then try this
Workflow method:
Create another list, create one list item where Title = 1
Now on your original list write a workflow which will read this value and print in your custom column. Once this is done the workflow will also increment the value into another list by one or reset it to one if it has reached to 3

07 May

Learning Technologies in a Social Way

I hate waking up early on weekends, but even after disabling alarms I still end up waking up the same time! So I decided to put this time to help others by blogging things that I learnt throughout the week.

This week I met Parag, and he has a really effective concept of learning technologies. He has a website called as “Do It Yourself Computer Science” where one can learn the technology with his own pace and then interact socially using twitter with others who are too learning the same course at that time. This happens by forming online study groups. This concept is called as Flipping the classroom which is a revolutionary concept that can replace the conventional classrooms. Watch this TED video about what flipping the classroom means.

19 Mar

How to display SharePoint 2010 processing animation?

This is not a huge deal. Putting in following code on your page will help.

<div style="position:absolute; z-index:1000;display:block;width:100%" id="divInProg" >

<table id="tblExPage" style="display:block" width="100%" >

<tr><td align="center">

<table width="75%" >

<tr>

<td align="center">

<div id="s4-simple-card" class="s4-simple-gearpage">

<div id="s4-simple-card-content">

<h1>

<img id="gearsImage" alt="This animation indicates the operation is in progress." src="/_layouts/images/gears_anv4.gif" style="width:24px; height:24px; font-size:0px;" align="absmiddle" />

Processing…

</div>

</td>

</tr>

</table>

</td>

</tr>

</table>

</div>

 

Processing

 

 

 

 

 

 

 

 

 

 

 

C# Solution:

If you need to do this using C# code then may be following link by Mano Mangaldas may help you.

Programmatically show processing screen ( Using SPLongOperation )