Navigate Up
Sign In

SharePoint Logical Field Update

Item is currently unrated. Press SHIFT+ENTER to rate this item.1 star selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+ESCAPE to leave rating submit mode.2 stars selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.3 stars selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.4 stars selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.5 stars selected. Press SHIFT+ENTER to submit. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.

You may also be interested in: fpweb.net

 

Editor's note: Contributor Amit Bhagat is a SharePoint developer. Follow him @AmitKBhagat

Introduction

This solution reads the set of logics defined in a list called “Logical Field Update” (created when the feature is activated) and updates the fields as defined in that list.

This solution has been scoped at web level.

Get It From CodePlex

The url is: https://logicalfieldupdate.codeplex.com/

Sample Videos

1. KPI Like Indicator
2. Progress Bar

What will you have after activation of feature

1. It will create a list “Logical Field Update” and don’t put link anywhere on site, so you need to browse through “All Site Content”.

2. A Webpart “Bulk Logical Update” is available under “CodePlex” group. This can be used to do bulk updates.

2013-06-03-SharePointLogicalField-01.png

About “Logical Field Update” list

This list contains the logic that can be evaluated automatically if a required event is selected and finally updates the field in the list defined.

Following are the details about the list fields:

  • List : The name of the target list the logic belongs to
  • Condition: The type of condition to evaluate
  • Value Type: Type of value match to be performed.
    • Auto Detect: Automatically detects the value and completes the comparison
    • String: Performs a string match
    • Numeric: Performs a numeric match
    • Date Time: Performs date/time match
  • Field To Compare: Title of the field whose value is to be matched
  • Value To Compare With: The value with which the “Field To Compare” value is to be matched. You can put the title of the field within a square bracket (example: [My Field]) as a place holder and it will be replaced by an actual value during the comparison. This field should belong to the same list as defined for the “List” above.
  • Update Field: The title of the field which will be updated if the condition yields true.
  • Update With: The value by which the field should be updated. The field title as defined for “Update Field” will be updated. You can put the title of the field within a square bracket (example: [My Field]) as a place holder and it will be replaced by an actual value during the comparison. This field should belong to the same list as defined for the “List” above.
  • Order: The execution order
  • Check Next: When the next condition should be checked.
    Always: It will always check the next condition if available
    If False: If current condition doesn't match
    If True: If current condition matches
  • Active: Only active logics will be executed so if unchecked it will not be executed
  • Condition Parameter: This defines extra parameters for String and Regex match.
    For example: If we need to match string case insensitive we need to uncheck “Make Test/String Match Case Sensitive”. The remaining options are for Regex match.
  • When To Check: For which event in the list should this logic need to be evaluated. In most cases Before events works well but in some cases like “Calculated” fields get updated After events.
  • Validate this Logic: Validates and checks the logic item. It makes sure:
    1. If list is defined for “List” exists.
    2. Fields defined for “Field To Compare” and “Update Field” exists
    3. Place holder fields ([My Fields]) exists.

Example 1 – Indicator

This will update a Hyper/Picture type field with image according to the importance of a ticket.

Upload the indicator images on your site and grab the url. In this case we have three indictor images and their urls are:

/Style%20Library/Images/ind-blue.png
/Style%20Library/Images/ind-orange.png
/Style%20Library/Images/ind-red.png

1. Create a new custom list “Tickets”

2. Add a new field:

Name

Criticality

Field Type

Choice

Options

1 - High
2 - Medium
3 – Low


3. Add a new field:

Name

Indicator

Field Type

Hyperlink/Picture

Format URL as

Picture


4. Open the list “Logical Field Update” and add logic as follows:

List

Tickets

Tickets

Tickets

Condition

Equal

Equal

Equal

Value Type

Auto Detect

Auto Detect

Auto Detect

Field To Compare

Criticality

Criticality

Criticality

Value To Compare With

1 - High

2 - Medium

3 - Low

Update Field

Indicator

Indicator

Indicator

Update With

/Style%20Library/Images/ind-red.png

/Style%20Library/Images/ind-blue.png

/Style%20Library/Images/ind-orange.png

Order

1

2

3

Check Next

If False

If False

If False

Active

[Default]

[Default]

[Default]

Condition Parameter

[Default]

[Default]

[Default]

When To Check

[Default]

[Default]

[Default]

Validate this logic

[Default]

[Default]

[Default]


That’s it! Add the items to “Tickets” and see the results. Below is a sample:

2013-06-03-SharePointLogicalField-02.png


Example 2 – Progress Bar

Using the tasks list “Tasks” to show the progress of task completion.

To show the progress we need two addition fields named “CompletedValue” and “Progress” and using the following HTML, we will update the “Progress” field to show the progress.

Upto 25%


<div style="position: relative; padding-bottom: 1px; background-color: black; padding-left: 1px; width: 100px; padding-right: 1px; height: 15px; padding-top: 1px">
<div style="background-color:red; width: [CompletedValue]px; height: 15px"></div>
<span style="position: absolute; line-height: 15px; height: 14px; color: white; font-size: 10px; top: 1px; left: 5px">[CompletedValue] %</span>
</div>

Upto 50%


<div style="position: relative; padding-bottom: 1px; background-color: black; padding-left: 1px; width: 100px; padding-right: 1px; height: 15px; padding-top: 1px">
<div style="background-color:blue; width: [CompletedValue]px; height: 15px"></div>
<span style="position: absolute; line-height: 15px; height: 14px; color: white; font-size: 10px; top: 1px; left: 5px">[CompletedValue] %</span>
</div>

Upto 75%


<div style="position: relative; padding-bottom: 1px; background-color: black; padding-left: 1px; width: 100px; padding-right: 1px; height: 15px; padding-top: 1px">
<div style="background-color:#4B610B; width: [CompletedValue]px; height: 15px"></div>
<span style="position: absolute; line-height: 15px; height: 14px; color: white; font-size: 10px; top: 1px; left: 5px">[CompletedValue] %</span>
</div>

Over 75%


<div style="position: relative; padding-bottom: 1px; background-color: black; padding-left: 1px; width: 100px; padding-right: 1px; height: 15px; padding-top: 1px">
<div style="background-color:green; width: [CompletedValue]px; height: 15px"></div>
<span style="position: absolute; line-height: 15px; height: 14px; color: white; font-size: 10px; top: 1px; left: 5px">[CompletedValue] %</span>
</div>

Let’s get started

1. Create two required columns in Tasks list

Column Name

CompletedValue

Column Type

Calculated

Formula

=[% Complete] * 100

The data type returned from this formula is:

Number

 

Column Name

Progress

Type

Multiple lines of text

Specify the type of text to allow

Enhanced rich text (Rich text with pictures, tables, and hyperlinks)


2. Add logic to “Logical Field Update” list

Add four logic items to list

1. To show progress bar up to 25%

List

Tasks

Condition

Lesser or Equal

Value Type

Auto Detect

Field To Compare

CompletedValue

Value To Compare

25

Update Field

Progress

Update With


<div style="position: relative; padding-bottom: 1px; background-color: black; padding-left: 1px; width: 100px; padding-right: 1px; height: 15px; padding-top: 1px">
<div style="background-color:red; width: [CompletedValue]px; height: 15px"></div>
<span style="position: absolute; line-height: 15px; height: 14px; color: white; font-size: 10px; top: 1px; left: 5px">[CompletedValue] %</span>
</div>

Order

1

Check Next

If False

Condition Parameter

[DEFAULT]

When To Check

After item added
After item updated

Validate this logic

Yes


2. To show progress bar up to 50%

List

Tasks

Condition

Lesser or Equal

Value Type

Auto Detect

Field To Compare

CompletedValue

Value To Compare

50

Update Field

Progress

Update With


<div style="position: relative; padding-bottom: 1px; background-color: black; padding-left: 1px; width: 100px; padding-right: 1px; height: 15px; padding-top: 1px">
<div style="background-color:blue; width: [CompletedValue]px; height: 15px"></div>
<span style="position: absolute; line-height: 15px; height: 14px; color: white; font-size: 10px; top: 1px; left: 5px">[CompletedValue] %</span>
</div>

Order

2

Check Next

If False

Condition Parameter

[DEFAULT]

When To Check

After item added
After item updated

Validate this logic

Yes


3. To show progress bar up to 75%

List

Tasks

Condition

Lesser or Equal

Value Type

Auto Detect

Field To Compare

CompletedValue

Value To Compare

75

Update Field

Progress

Update With


<div style="position: relative; padding-bottom: 1px; background-color: black; padding-left: 1px; width: 100px; padding-right: 1px; height: 15px; padding-top: 1px">
<div style="background-color:#4B610B; width: [CompletedValue]px; height: 15px"></div>
<span style="position: absolute; line-height: 15px; height: 14px; color: white; font-size: 10px; top: 1px; left: 5px">[CompletedValue] %</span>
</div>

Order

3

Check Next

If False

Condition Parameter

[DEFAULT]

When To Check

After item added
After item updated

Validate this logic

Yes


4. To show progress bar over 75%

List

Tasks

Condition

Greater

Value Type

Auto Detect

Field To Compare

CompletedValue

Value To Compare

75

Update Field

Progress

Update With


<div style="position: relative; padding-bottom: 1px; background-color: black; padding-left: 1px; width: 100px; padding-right: 1px; height: 15px; padding-top: 1px">
<div style="background-color:green; width: [CompletedValue]px; height: 15px"></div>
<span style="position: absolute; line-height: 15px; height: 14px; color: white; font-size: 10px; top: 1px; left: 5px">[CompletedValue] %</span>
</div>

Order

4

Check Next

If False

Condition Parameter

[DEFAULT]

When To Check

After item added
After item updated

Validate this logic

Yes


The following is the final sample:

2013-06-03-SharePointLogicalField-03.png

Categories: SharePoint; Reporting

Comments

Chanel iPad Mini Case

Chanel iPad Mini Case

The web site seems a lttle bit unusual once i use my portable internet browser on my small blackberry mobile phones. You want to make sure that you should.Louis vuitton Galaxy S4 Case

Posted 25-Jul-2013 by Chanel iPad Mini Case
cowok paling ganteng se indonesia

Thank you for sharing this one

Thank you for sharing this one. I'll continually be coming on a regular basis you just read your posts. sepatu vans off the wall new balance indonesia

Posted 11-Dec-2013 by cowok paling ganteng se indonesia
jeremy williams

Awesome post

I essentially need to let you know that I am new to web journal and doubtlessly enjoyed this website webpage. Likely I'm going to bookmark your online journal . You totally have grand stories. Cheers for imparting to us your web journal. web designing Delhi

Posted 19-Mar-2014 by jeremy williams

Notify me of comments to this article

E-mail:
   

Add Comment

Title:

 
Comment:
Email:

   


Name:

 
Url: