Category Archives: דאַטע View וועב חלק

קאַמפּערינג דאַטעס אין אַ דאַטע View וועב חלק צו בויען אַ ווסס קפּי

טאָן: this was first posted at www.endusersharepoint.com דאָ: הטטפּ://www.endusersharepoint.com/2009/11/02/comparing-dates-in-a-data-view-web-part-to-build-a-wss-kpi-in-sharepoint/.

דאס איז נאָך אן אנדער בלאָג פּאָסטן אויף קאַמפּערינג דאַטעס אין קססל אין אַ דאַטן מיינונג וועב טייל אין שאַרעפּאָינט.

דאס איז מיין סצענאַר:

  • איך האב אַ מנהג רשימה.
  • The business purpose of the list is to support the idea of a new employee and his/her tasks to be completed within 7 days of starting the job.
  • They are in a “warning zone” after 4 days if they have not completed these tasks.
  • I want to create a simple dashboard that shows green when they have either completed the task or if they have more than 4 days to complete it.
  • I want the dashboard to show yellow if they are in the warning zone.
  • I want to to show red if they have not completed the task after the due date.

I borrowed from דעם אַרטיקל בייַ Marc Anderson’s בלאָג (http://mdasblog.wordpress.com/2008/02/19/comparing-dates-in-sharepoint-using-xsl/) to get the comparison logic and דעם אַרטיקל בייַ www.endusersharepoint.com for the basic ideas behind the dashboard (http://www.endusersharepoint.com/2008/12/09/visual-indicators-for-the-masses-kpis-in-wss/) written by Toni Frankola.

You should read the supporting blogs, but the implementation goes like this:

  1. שאַפֿן אַ צופרידן טיפּ (שפאלטן + קאָרט)
  2. Create a custom list and associate it with the content type.
  3. Create a web part page.
  4. Add the custom list to the web part page.
  5. Open up the page in SPD.
  6. Convert the list to a DVWP.
  7. Modify the XSL to generate the dashboard bits.

I have two dates: a warning date and a due date. To compare the dates, my xsl does the following:

 
 <קססל:קלייַבן>
 
 <!-- When both handbook and policy are signed, מיר זענען גרין ראַגאַרדלאַס פון דאַטעס. -->
 <קססל:ווען פּרובירן="@Employee_x0020_Handbook_x003F_ = 1 און @ סעקוריטי_קס0020_פּאָליסיעס = 1">
 <ימג סרק="/_layouts/images/KPIDefault-0.גיף" אַלט="No problems"/>
 <אַ הרעף="/HumanResources/Lists/New Employee Checklist/EditForm.aspx?שייַן ={@ שייַן}&אַמפּ;מקור = / הומאַנרעסאָורסעס / שערד דאָקומענץ / ניו הירע דאַשבאָאַרד.אַספּקס"> [ויסרעדאַגירן]</אַ>
 </קססל:ווען>
 
 <!-- ווייַזן בורשטין גראדן אויב מיר ניטאָ פאַרגאַנגענהייַט די ווארענונג דאַטע. -->
 <קססל:ווען פּרובירן="ddwrt:פאָרמאַטדאַטעטימע(שטריקל(דדוורט:הייַנט()), 1033, 'ייייממדד') &גט;= דדוורט:פאָרמאַטדאַטעטימע(שטריקל(@ טאַסקדועדאַטע), 1033, 'ייייממדד')">
 <ימג סרק="/_layouts/images/KPIDefault-2.GIF" אַלט="Overdue"/>
 <אַ סטיל="border: 0פּקס" הרעף="/HumanResources/Lists/New Employee Checklist/EditForm.aspx?שייַן ={@ שייַן}&אַמפּ;מקור = / הומאַנרעסאָורסעס / שערד דאָקומענץ / ניו הירע דאַשבאָאַרד.אַספּקס"> [ויסרעדאַגירן]</אַ>
 </קססל:ווען>
 
 <!-- ווייַזן רויט גראדן אויב מיר ניטאָ דורכגעגאנגען די רעכט דאַטע. -->
 <קססל:ווען פּרובירן="ddwrt:פאָרמאַטדאַטעטימע(שטריקל(דדוורט:הייַנט()), 1033, 'ייייממדד') &גט;= דדוורט:פאָרמאַטדאַטעטימע(שטריקל(@ וואַרנינג_קס0020_דאַטע), 1033, 'ייייממדד')">
 <ימג סרק="/_layouts/images/KPIDefault-1.GIF" אַלט="Warning"/> 
 <אַ הרעף="/HumanResources/Lists/New Employee Checklist/EditForm.aspx?שייַן ={@ שייַן}&אַמפּ;מקור = / הומאַנרעסאָורסעס / שערד דאָקומענץ / ניו הירע דאַשבאָאַרד.אַספּקס"> [ויסרעדאַגירן]</אַ>
 </קססל:ווען>
 
 <!-- אויב מיר באַקומען דאָ, מיר ניטאָ פריער ווי די ווארענונג דאַטע, אַזוי מיר ניטאָ גרין. -->
 <קססל:אַנדערש>
 <ימג סרק="/_layouts/images/KPIDefault-0.גיף" אַלט="No problems"/>
 <אַ הרעף="/HumanResources/Lists/New Employee Checklist/EditForm.aspx?שייַן ={@ שייַן}&אַמפּ;מקור = / הומאַנרעסאָורסעס / שערד דאָקומענץ / ניו הירע דאַשבאָאַרד.אַספּקס"> [ויסרעדאַגירן]</אַ>
 </קססל:אַנדערש>
 
 </קססל:קלייַבן>

א ביסל שליסל פונקטן פון אויבן:

  • I tried to compare dates without using the ddwrt functionality and got nowhere. I still don’t understand that. They dates displayed correctly, אָבער ביידע ">"און"<” comparisons always failed. אין די סוף, דדוורט געקומען צו מיין ראַטעווען (דאַנק, ווידער, מאַרק).
  • איך בין אויך ווייַזנדיק אַ [ויסרעדאַגירן] link to the item. I mainly did this so that I could easily test this out. The link itself may be useful to someone trying to figure it out.
  • דאס איז ימפּלאַמענאַד אין שאַרעפּאָינט אָנליין און אַרבעט נייסלי.
  • די בילדער איך דערמאָנען אין די _לייַאָוץ Directory (/_לייַאָוץ / בילדער / קפּי ...) זענען פאַראַנען אויס פון די קעסטל אין מיין סוויווע אַזוי זיי זענען מיסטאָמע פאַראַנען פֿאַר איר ווי געזונט.

דאָ ס אַ פאַרשטעלן שאָס פון וואָס עס קוקט ווי פֿאַר מיר:

image

</עק>

אַבאָנירן צו מיין בלאָג.

גיי מיר אויף טוויטטער בייַ http://www.twitter.com/pagalvin

שנעל און יזי: שאַפֿן אַ דאַטע View וועב חלק (דוווופּ)

עס איז אַ עשירות פון גרויס אינפֿאָרמאַציע אויף די ווסס 3.0 דאַטע View וועב חלק (דוווופּ) on the web from several sources. אָבער, I found it to be surprisingly difficult to find information on this first very basic step. Here is another article in the "quick and easy" סעריע צו אַדרעס עס.

גיי די טריט צו שאַפֿן אַ דאַטן מיינונג וועב טייל (דוווופּ). They are based on an "Announcements" וועב טייל, אָבער צולייגן צו רובֿ רשימות.

  1. שאַפֿן אַ מודעות וועב טייל און לייגן עס צו אַ פּלאַץ.
  2. עפענען די פּלאַץ אין שאַרעפּאָינט דיזיינער.
  3. עפענען די פּלאַץ ס דעפאַולט.אַספּקס.
  4. Select the Announcements web part and right-click.
  5. פון די קאָנטעקסט מעניו, select "Convert to XSלT Data View".

שאַרעפּאָינט דיזיינער נאָוטאַפייז איר אַז דאָס פּלאַץ איז איצט קאַסטאַמייזד פון זייַן פּלאַץ דעפֿיניציע. אַז ס 'נישט דאַווקע שלעכט, אָבער עס זענען וויכטיק ימפּלאַקיישאַנז (פאָרשטעלונג, אַפּגרייד, אנדערע) which are beyond the scope of this little "Quick and Easy" פּאָזיציע. To get more information on this subject, איך רעקאָמענדירן ביידע ספרים דאָ ווי געזונט ווי דיין באַליבט אינטערנעט זוכן.

באַשטעטיקן אַז איר האט עס ריכטיק:

  1. נאָענט און שייַעך-עפענען די וועב בלעטערער (to avoid accidentally re-posting the original "add a new web part").
  2. Select the web part’s arrow drop-down and choose "Modify Shared Web Part" פון די מעניו.
  3. די געצייַג טאַפליע עפענען צו די רעכט.
  4. די טאַפליע האט געביטן פון זייַן געוויינטלעך שטעלן אָפּציעס צו דעם:
בילד