Produced by Araxis Merge on 11/9/2018 12:16:34 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 | FixCalendarOrder.ps1 | Sun Aug 19 22:50:24 2018 UTC |
2 | RAMS-2.3.0.zip\RAMS-2.3.0\ps | FixCalendarOrder.ps1 | Fri Nov 9 14:54:12 2018 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 2 | 672 |
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 | Fixes the field order on a ll calenda rs | |
4 | ||
5 | .DESCRIPTI ON | |
6 | Loops through ea ch facilit y subsite and fixes the field order on e ach IRB, R DC< IACUC< and SRS c alendar | |
7 | ||
8 | .EXAMPLE | |
9 | #when run from d eploymentD river.ps1 | |
10 | Run-Sc ript 260 F ixCalendar Order.ps1 | |
11 | ||
12 | .EXAMPLE | |
13 | #when run from t he powersh ell comman d prompt. | |
14 | .\FixC alendarOrd er.ps1 | |
15 | #> | |
16 | Add-PSSnap in Microso ft.SharePo int.Powers hell | |
17 | ||
18 | $facilitie s = @{ | |
19 | } | |
20 | ||
21 | function G etAllWebs( $url) { | |
22 | write- log -messa ge "$([Str ing]::Form at("Proces ing web {0 }",$w.Url) )" -consol eForegroun d Cyan | |
23 | if ($w.Webs.C ount -gt 0 ) { | |
24 | foreach( $web in $w .Webs) { | |
25 | FixCal endarOrder $web | |
26 | } | |
27 | } | |
28 | } | |
29 | ||
30 | function F ixCalendar Order($sub web) { | |
31 | #- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- -------- | |
32 | $list = $subweb. Lists.TryG etList("Co mmittee Ca lendar") | |
33 | $conte ntType = " Event" | |
34 | $ct = $list.Cont entTypes[$ contentTyp e] | |
35 | ||
36 | if($li st -ne $nu ll) { | |
37 | wr ite-log -m essage "Fi xing Order for Commi ttee Calen dar on $($ subweb.Url )" -consol eForegroun d Cyan | |
38 | $c ontentType = "Event" | |
39 | $n ewFieldOrd er = @("Ti tle", | |
40 | "EventDa te", | |
41 | "EndDate ", | |
42 | "Locatio n", | |
43 | "fAllDay Event", | |
44 | "fRecurr ence", | |
45 | "Committ eeAttendee s", | |
46 | "Partici pantsPicke r", | |
47 | "Adminis trative_x0 020_Items" , | |
48 | "Submitt edApplicat ionLookup" , | |
49 | "Committ eeMeetingM inuteLooku p", | |
50 | "Deliber ation", | |
51 | "Decisio n" | |
52 | ) | |
53 | ||
54 | if ( $list.Fiel ds.Contain sFieldWith StaticName ("Submitte dApplicati onLookup") ) { | |
55 | $App licationsS tudyLookup Field = $l ist.Fields .TryGetFie ldByStatic Name("Subm ittedAppli cationLook up"); | |
56 | $App licationsS tudyLookup Field.Show InEditForm =$True; | |
57 | $App licationsS tudyLookup Field.Show InNewForm= $True; | |
58 | $App licationsS tudyLookup Field.Upda te($true) | |
59 | $lis t.Update($ true) | |
60 | } | |
61 | if ($list.Fi elds.Conta insFieldWi thStaticNa me("Commit teeMeeting MinuteLook up")) { | |
62 | $App licationsS tudyLookup Field = $l ist.Fields .TryGetFie ldByStatic Name("Comm itteeMeeti ngMinuteLo okup"); | |
63 | $App licationsS tudyLookup Field.Show InEditForm =$True; | |
64 | $App licationsS tudyLookup Field.Show InNewForm= $True; | |
65 | $App licationsS tudyLookup Field.Upda te($true) | |
66 | $lis t.Update($ true) | |
67 | } | |
68 | if ($list.Fi elds.Conta insFieldWi thStaticNa me("Decisi on")) { | |
69 | $App licationsS tudyLookup Field = $l ist.Fields .TryGetFie ldByStatic Name("Deci sion"); | |
70 | $App licationsS tudyLookup Field.Show InEditForm =$True; | |
71 | $App licationsS tudyLookup Field.Show InNewForm= $True; | |
72 | $App licationsS tudyLookup Field.Upda te($true) | |
73 | $lis t.Update($ true) | |
74 | } | |
75 | if ($list.Fi elds.Conta insFieldWi thStaticNa me("Delibe ration")) { | |
76 | $App licationsS tudyLookup Field = $l ist.Fields .TryGetFie ldByStatic Name("Deli beration") ; | |
77 | $App licationsS tudyLookup Field.Show InEditForm =$True; | |
78 | $App licationsS tudyLookup Field.Show InNewForm= $True; | |
79 | $App licationsS tudyLookup Field.Upda te($true) | |
80 | $lis t.Update($ true) | |
81 | } | |
82 | if ($list.Fi elds.Conta insFieldWi thStaticNa me("TaxKey word")) { | |
83 | $App licationsS tudyLookup Field = $l ist.Fields .TryGetFie ldByStatic Name("TaxK eyword"); | |
84 | $App licationsS tudyLookup Field.Show InEditForm =$False; | |
85 | $App licationsS tudyLookup Field.Show InNewForm= $False; | |
86 | $Applica tionsStudy LookupFiel d.Hidden = $True; | |
87 | $App licationsS tudyLookup Field.Upda te($true) | |
88 | $lis t.Update($ true) | |
89 | } | |
90 | $c t = $list. ContentTyp es[$conten tType] | |
91 | $c t.FieldLin ks.Reorder ($newField Order) | |
92 | $c t.Update() | |
93 | $l ist.Update () | |
94 | $s ubweb.Upda te() | |
95 | } | |
96 | ||
97 | #- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- -------- | |
98 | $list = $subweb. Lists.TryG etList("RD C Calendar ") | |
99 | if($li st -ne $nu ll) { | |
100 | wr ite-log -m essage "Fi xing Order for RDC C alendar on $($subweb .Url)" -co nsoleForeg round Cyan | |
101 | $c ontentType = "Event" | |
102 | $n ewFieldOrd er = @("Ti tle", | |
103 | "E ventDate", | |
104 | "E ndDate", | |
105 | "L ocation", | |
106 | "f AllDayEven t", | |
107 | "f Recurrence ", | |
108 | "C ommitteeAt tendees", | |
109 | "E ventAttend ees", | |
110 | "A dministrat ive_x0020_ Items", | |
111 | "A pprovedApp licationsL ookup", | |
112 | "R DCMeetingM inuteLooku p", | |
113 | "D eliberatio n", | |
114 | "D ecision" | |
115 | ) | |
116 | ||
117 | if ($list.Fi elds.Conta insField(" TaxKeyword ")) { | |
118 | $enterpr iseField = $list.Fie lds.GetFie ldByIntern alName("Ta xKeyword") | |
119 | $list.Fi elds.Delet e($enterpr iseField) | |
120 | #$enterp riseField. Update($tr ue) | |
121 | $list.Up date($true ) | |
122 | } | |
123 | ||
124 | if ($list.Fi elds.Conta insField(" Category") ) { | |
125 | $cat egoryfield =$list.Fie lds["Categ ory"] | |
126 | $cat egoryfield .ShowInNew Form=$fals e | |
127 | $cat egoryfield .ShowInEdi tForm=$fal se | |
128 | $cat egoryfield .Update($t rue) | |
129 | $lis t.Update($ true) | |
130 | } | |
131 | ||
132 | if ($list.Fi elds.Conta insField(" EventAdmin istrativeI tems")) { | |
133 | $Eve ntAdminist rativeItem sField = $ list.Field s.GetField ByInternal Name("Even tAdministr ativeItems "); | |
134 | $Eve ntAdminist rativeItem sField.Sho wInEditFor m=$false; | |
135 | $Eve ntAdminist rativeItem sField.Sho wInNewForm =$false; | |
136 | $Eve ntAdminist rativeItem sField.Upd ate($true) | |
137 | $lis t.Update($ true) | |
138 | } | |
139 | ||
140 | if ($list.Fi elds.Conta insField(" EventAtten dees")) { | |
141 | $Eve ntAttendee sField = $ list.Field s.GetField ByInternal Name("Even tAttendees "); | |
142 | $Eve ntAttendee sField.Sho wInEditFor m=$true; | |
143 | $Eve ntAttendee sField.Sho wInNewForm =$true; | |
144 | $Eve ntAttendee sField.Upd ate($true) | |
145 | $lis t.Update($ true) | |
146 | } | |
147 | ||
148 | if ( $list.Fiel ds.Contain sField("At tendees")) { | |
149 | $Eve ntAttendee sField = $ list.Field s.GetField ByInternal Name("Even tAttendees "); | |
150 | $Eve ntAttendee sField.Sho wInEditFor m=$true; | |
151 | $Eve ntAttendee sField.Sho wInNewForm =$true; | |
152 | $Eve ntAttendee sField.Upd ate($true) | |
153 | $lis t.Update($ true) | |
154 | } | |
155 | ||
156 | if ($list.Fi elds.Conta insField(" EventCommi tteeAttend ees")) { | |
157 | $Com mitteeAtte ndeesField = $list. Fields.Get FieldByInt ernalName( "EventComm itteeAtten dees"); | |
158 | $Com mitteeAtte ndeesField .ShowInEdi tForm=$fal se; | |
159 | $Com mitteeAtte ndeesField .ShowInNew Form=$fals e; | |
160 | $Com mitteeAtte ndeesField .Update($t rue) | |
161 | $lis t.Update($ true) | |
162 | } | |
163 | ||
164 | if ($list.Fi elds.Conta insField(" EventCommi tteeAttend ees")) { | |
165 | $Dec isionField = $list. Fields.Get FieldByInt ernalName( "EventComm itteeAtten dees"); | |
166 | $Dec isionField .ShowInEdi tForm=$fal se; | |
167 | $Dec isionField .ShowInNew Form=$fals e; | |
168 | $Dec isionField .Update($t rue) | |
169 | $lis t.Update($ true) | |
170 | } | |
171 | ||
172 | if ($list.Fi elds.Conta insField(" Applicatio nsLookup") ) { | |
173 | $applica tionsField =$list.Fie lds["Appli cationsLoo kup"] | |
174 | $applica tionsField .ShowInNew Form=$fals e | |
175 | $applica tionsField .ShowInEdi tForm=$fal se | |
176 | $applica tionsField .Update($t rue) | |
177 | $list.Up date($true ) | |
178 | } | |
179 | ||
180 | if ($list.Fi elds.Conta insField(" ApprovedRD CApplicati onLookup") ) { | |
181 | $approve dRDCApplic ationLooku p=$list.Fi elds["Appr ovedRDCApp licationLo okup"] | |
182 | $approve dRDCApplic ationLooku p.ShowInNe wForm=$fal se | |
183 | $approve dRDCApplic ationLooku p.ShowInEd itForm=$fa lse | |
184 | $approve dRDCApplic ationLooku p.Update($ true) | |
185 | $list.Up date($true ) | |
186 | } | |
187 | ||
188 | $ct = $l ist.Conten tTypes[$co ntentType] | |
189 | if ($list.Fi elds.Conta insField(" Descriptio n")) { | |
190 | #$ct = $list.C ontentType s[$content Type] | |
191 | $ct. FieldLinks ["Descript ion"].Hidd en = $True | |
192 | #$ct .Update() | |
193 | #$li st.Update( $true) | |
194 | #$subweb .Update() | |
195 | } | |
196 | ||
197 | #$ct = $ list.Conte ntTypes[$c ontentType ] | |
198 | $c t.FieldLin ks.Reorder ($newField Order) | |
199 | $c t.Update() | |
200 | $l ist.Update () | |
201 | $s ubweb.Upda te() | |
202 | } | |
203 | ||
204 | #- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- -------- | |
205 | $list = $subweb. Lists.TryG etList("IA CUC Calend ar") | |
206 | if($li st -ne $nu ll) { | |
207 | wr ite-log -m essage "Fi xing Order for IACUC Calendar on $($subw eb.Url)" - consoleFor eground Cy an | |
208 | $c ontentType = "Event" | |
209 | $n ewFieldOrd er = @("Ti tle", | |
210 | "EventDa te", | |
211 | "EndDate ", | |
212 | "Locatio n", | |
213 | "fAllDay Event", | |
214 | "fRecurr ence", | |
215 | "Committ eeAttendee s", | |
216 | "EventAt tendees", | |
217 | "Adminis trative_x0 020_Items" , | |
218 | "Submitt edApplicat ionLookup" , | |
219 | "IACUCMe etingMinut eLookup", | |
220 | "Deliber ation", | |
221 | "Decisio n" | |
222 | ) | |
223 | ||
224 | if ($list.Fi elds.Conta insField(" TaxKeyword ")) { | |
225 | $enterpr iseField = $list.Fie lds.GetFie ldByIntern alName("Ta xKeyword") | |
226 | $list.Fi elds.Delet e($enterpr iseField) | |
227 | } | |
228 | ||
229 | if ($list.Fi elds.Conta insField(" Category") ) { | |
230 | $cat egoryfield =$list.Fie lds["Categ ory"] | |
231 | $cat egoryfield .ShowInNew Form=$fals e | |
232 | $cat egoryfield .ShowInEdi tForm=$fal se | |
233 | $cat egoryfield .Update($t rue) | |
234 | $lis t.Update() | |
235 | } | |
236 | ||
237 | if ($list.Fi elds.Conta insField(" Applicatio nsLookup") ) { | |
238 | $applica tionsField =$list.Fie lds["Appli cationsLoo kup"] | |
239 | $applica tionsField .ShowInNew Form=$fals e | |
240 | $applica tionsField .ShowInEdi tForm=$fal se | |
241 | $applica tionsField .Update($t rue) | |
242 | $list.Up date() | |
243 | } | |
244 | ||
245 | if ($list.Fi elds.Conta insField(" ApprovedRD CApplicati onLookup") ) { | |
246 | $approve dRDCApplic ationLooku p=$list.Fi elds["Appr ovedRDCApp licationLo okup"] | |
247 | $approve dRDCApplic ationLooku p.ShowInNe wForm=$fal se | |
248 | $approve dRDCApplic ationLooku p.ShowInEd itForm=$fa lse | |
249 | $approve dRDCApplic ationLooku p.Update($ true) | |
250 | $list.Up date() | |
251 | } | |
252 | ||
253 | $ct = $l ist.Conten tTypes[$co ntentType] | |
254 | if ($list.Fi elds.Conta insField(" Descriptio n")) { | |
255 | #$ct = $list.C ontentType s[$content Type] | |
256 | $ct. FieldLinks ["Descript ion"].Hidd en = $True | |
257 | #$ct .FieldLink s.Reorder( $newFieldO rder) | |
258 | #$ct .Update() | |
259 | #$li st.Update( ) | |
260 | } | |
261 | ||
262 | #$ct = $ list.Conte ntTypes[$c ontentType ] | |
263 | $c t.FieldLin ks.Reorder ($newField Order) | |
264 | $c t.Update() | |
265 | $l ist.Update () | |
266 | $s ubweb.Upda te() | |
267 | } | |
268 | ||
269 | #- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- -------- | |
270 | $list = $subweb. Lists.TryG etList("SR S Calendar ") | |
271 | if($li st -ne $nu ll) { | |
272 | wr ite-log -m essage "Fi xing Order for SRS C alendar on $($subweb .Url)" -co nsoleForeg round Cyan | |
273 | $c ontentType = "Event" | |
274 | $n ewFieldOrd er = @("Ti tle", | |
275 | "EventDa te", | |
276 | "EndDate ", | |
277 | "Locatio n", | |
278 | "fAllDay Event", | |
279 | "fRecurr ence", | |
280 | "EventCo mmitteeAtt endees", | |
281 | "EventAt tendees", | |
282 | "EventAd ministrati veItems", | |
283 | "Submitt edApplicat ionLookup" , | |
284 | "SRSMeet ingMinuteL ookup", | |
285 | "Deliber ation", | |
286 | "Decisio n" | |
287 | ) | |
288 | ||
289 | if ($list.Fi elds.Conta insField(" TaxKeyword ")) { | |
290 | $enterpr iseField = $list.Fie lds.GetFie ldByIntern alName("Ta xKeyword") | |
291 | $list.Fi elds.Delet e($enterpr iseField) | |
292 | } | |
293 | ||
294 | if ($list.Fi elds.Conta insField(" Category") ) { | |
295 | $cat egoryfield =$list.Fie lds["Categ ory"] | |
296 | $cat egoryfield .ShowInNew Form=$fals e | |
297 | $cat egoryfield .ShowInEdi tForm=$fal se | |
298 | $cat egoryfield .Update($t rue) | |
299 | $lis t.Update() | |
300 | } | |
301 | ||
302 | if ($list.Fi elds.Conta insField(" Applicatio nsLookup") ) { | |
303 | $applica tionsField =$list.Fie lds["Appli cationsLoo kup"] | |
304 | $applica tionsField .ShowInNew Form=$fals e | |
305 | $applica tionsField .ShowInEdi tForm=$fal se | |
306 | $applica tionsField .Update($t rue) | |
307 | $list.Up date() | |
308 | } | |
309 | ||
310 | if ($list.Fi elds.Conta insField(" ApprovedRD CApplicati onLookup") ) { | |
311 | $approve dRDCApplic ationLooku p=$list.Fi elds["Appr ovedRDCApp licationLo okup"] | |
312 | $approve dRDCApplic ationLooku p.ShowInNe wForm=$fal se | |
313 | $approve dRDCApplic ationLooku p.ShowInEd itForm=$fa lse | |
314 | $approve dRDCApplic ationLooku p.Update($ true) | |
315 | $list.Up date() | |
316 | } | |
317 | ||
318 | $c t = $list. ContentTyp es[$conten tType] | |
319 | if ($list.Fi elds.Conta insField(" Descriptio n")) { | |
320 | #$ct = $list.C ontentType s[$content Type] | |
321 | $ct. FieldLinks ["Descript ion"].Hidd en = $True | |
322 | #$ct .Update() | |
323 | #$li st.Update( ) | |
324 | } | |
325 | ||
326 | #$ ct = $list .ContentTy pes[$conte ntType] | |
327 | $c t.FieldLin ks.Reorder ($newField Order) | |
328 | $c t.Update() | |
329 | $l ist.Update () | |
330 | $s ubweb.Upda te() | |
331 | } | |
332 | } | |
333 | ||
334 | #This is t o test the driver co ntains a $ siteUrl | |
335 | #$siteUrl= "https:// DNS . URL /sites/IRB Applicatio ns/"; | |
336 | $w = Get-S PWeb $site Url; | |
337 | GetAllWebs ($siteUrl) |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.