Get current Logged in name when workflow task updated

Hi All

Scenario:

I had requirement to create custom workflow for multiple approval process. Workflow is running successfully as per client’s requirement. It needs to update the field named ‘Checked By’ (i.e. type of person and group) by username who checked the document in document library. But here it always written as ‘System Account’ instead of actual username who checked the document (task).

Workaround:

I’ve searched lots to display actual user name instead of ‘System Account’. Finally I’ve found following lines of code to get actual username who checked/approved the task.

Resolution:

string currentusername = string.Empty;

private void onTaskChanged1_Invoked(object sender, ExternalDataEventArgs e)

{

currentusername = e.Identity; //retrns server/username(i.e.loginame)

SPUser user = workflowProperties.Web.SiteUsers[currentusername].ID;

workflowProperties.Item["Checked by"] = user.Name;

workflowProperties.Item.Update();

}

That's it...Hope this will work for you.


Cheers !!

How to use Calculated Column in Sharepoint

Hello All,

This post represents the example of Calculated Column in SharePoint.

I’ve created sample SharePoint list with two fields (i.e. MarkObtained & Grade). The field “Grade” is considered as a Calculated Column. Below is my requirement.

If MarkObtained >= 70 then Grade would be “Distinction”
If MarkObtained <>= 60 then Grade would be “First Class”
If MarkObtained <>= 50 then Grade would be “Second Class”
If MarkObtained <>= 40 then Grade would be “Pass Class”


For Calculate Field (i.e. Grade), I need to write formula based on “Marks Obtained” field’s value. Please find the correct formula below:

If MarkObtained >=70,"Distinction",
(IF (AND (MarkObtained<70,>=60),"First Class",
(IF (AND (MarkObtained<60,>=50),"Second Class",
(IF (AND (MarkObtained<50,>=40),"Pass Class","Fail")))))))

This way we can get value in the “Grade” field based on calculation of “MarkObtained”.

Multipage Meeting Workspace: Unable to see uploaded document in Document Library

Problem:

I’ve created document library and I wanted to upload document/files programming. My Program for uploading documents in to document library was running successfully but I could not able to see uploaded Documents /Files listed in document library.

Resolution:

If you need these items to display the do the below steps:
  1. Go to your Document Library --> Advanced Settings.
  2. Change the setting from ‘No’ to ‘Yes’ for ‘Share List Items Across All Meetings (Series Items) ’ . By default it will set as ‘No’.This way you able to see uploaded document/files in to document library.
Hope this will work for you!!!