Produced by Araxis Merge on 11/9/2018 12:16:35 PM Eastern Standard Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
# | Location | File | Last Modified |
---|---|---|---|
1 | RAMS-2.3.0.zip\RAMS-2.3.0\ps | UpdateSubmittedColumn.ps1 | Sun Aug 19 19:53:38 2018 UTC |
2 | RAMS-2.3.0.zip\RAMS-2.3.0\ps | UpdateSubmittedColumn.ps1 | Fri Nov 9 14:54:12 2018 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 2 | 126 |
Changed | 1 | 2 |
Inserted | 0 | 0 |
Removed | 0 | 0 |
Whitespace | |
---|---|
Character case | Differences in character case are significant |
Line endings | Differences in line endings (CR and LF characters) are ignored |
CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
1 | <# | |
2 | .SYNOPSIS | |
3 | Update s the Subm ittedAppli cations ca lculated f ield in th e Applicat ionFacilit yLookup li st. | |
4 | ||
5 | .DESCRIPTI ON | |
6 | Loops through al l subsites and updat es the Sub mittedAppl ications c alculated field in t he Applica tionFacili tyLookup l ist. | |
7 | ||
8 | .EXAMPLE | |
9 | #when run from d eploymentD river.ps1 | |
10 | Run-Sc ript 320 U pdateSubmi ttedColumn .ps1 | |
11 | ||
12 | .EXAMPLE | |
13 | #when run from t he powersh ell comman d prompt. | |
14 | .\Upda teSubmitte dColumn.ps 1 | |
15 | #> | |
16 | ||
17 | Add-PSSnap in Microso ft.SharePo int.Powers hell | |
18 | ||
19 | function G etAllWebs( $url) | |
20 | { | |
21 | try | |
22 | { | |
23 | wr ite-log -m essage "$( [String]:: Format("Pr ocesing we b {0}",$w. Url))" -co nsoleForeg round Cyan | |
24 | ||
25 | if ($w.Webs.C ount -gt 0 ) | |
26 | { | |
27 | foreach( $web in $w .Webs) | |
28 | { | |
29 | Updat eSubmitted Calculated Field $web | |
30 | } | |
31 | } | |
32 | } | |
33 | catch | |
34 | { | |
35 | wr ite-log -m essage "$( [String]:: Format("Er ror proces sing web a t $url, wi th Excepti on: {0}", $_.Excepti on.Message ))" -conso leForegrou nd Red | |
36 | if ($($_.Exc eption.Err orRecord)) { write-l og -messag e "$($_.Ex ception.Er rorRecord) " -console Foreground Red } | |
37 | if ($($_.Exc eption.sta cktrace)) { write-lo g -message "$($_.Exc eption.sta cktrace)" -consoleFo reground R ed } | |
38 | if ($($_.Scr iptStackTr ace)) { wr ite-log -m essage "$( $_.ScriptS tackTrace) " -console Foreground Red } | |
39 | } | |
40 | } | |
41 | ||
42 | function U pdateSubmi ttedCalcul atedField ($web) { | |
43 | #V ariables | |
44 | $L istName="A pplication FacilityLo okup" | |
45 | $C alculatedC olumnName= "Submitted Applicatio ns" | |
46 | ||
47 | #G et the Lis t | |
48 | $l ist = $web .Lists.Try GetList($L istName) | |
49 | if ($l ist -ne $n ull) { | |
50 | if ( $list.Fiel ds.Contain sFieldWith StaticName ("Submitte dApplicati ons")) { | |
51 | #Get t he column | |
52 | $Calcu latedCol = $List.Fie lds.GetFie ld($Calcul atedColumn Name) | |
53 | #Set F ormula for calculate d column | |
54 | $Calcu latedCol.F ormula="=I F(AND(OR([ Applicatio n Status]= ""Submitte d"",[Appli cation Sta tus]=""Und er Review" "), ISBLAN K(MovedToF acility)), [Study Tit le],"""")" | |
55 | $Calcu latedCol.U pdate() | |
56 | } | |
57 | } | |
58 | } | |
59 | ||
60 | #This is t o test the driver co ntains a $ siteUrl | |
61 | #$siteUrl= "https:// DNS . URL /sites/IRB Applicatio ns/"; | |
62 | $w = Get-S PWeb $site Url; | |
63 | GetAllWebs ($siteUrl) | |
64 |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.