Արագ եւ հեշտ: Որոշել ներքին սյունակ անունը մի կայքի սյունակում

ԹԱՐՄԱՑՆԵԼ: Jeremy Thake ն Blogged մասին, եւ համակերպվել որոշ կոդը համար կոնսոլից դիմում որը ցույց է տալիս ներքին անունները.

I was trying to get a content query web part to display a due date from a task and because the screen label is "Due Date", Ես ենթադրել, որ շարասյունը անունը օգտագործել <CommonViewFields> is "Due_x0020_Date".

Սխալ!

The real column name in this case was "DueDate".

Ինչպես եմ գտնել այն? I re-read Heather Սողոմոնի սեփական օրագիրը գրառումը փոփոխող CQWP to show additional columns of data. She describes this process at step #13. Trust it. It’s correct. At least, it was correct for me. I did not trust it at first for another column with a much longer name.

I say "Trust it" because I did not trust it and probably wasted near two hours butting my head up against a wall. After I resolved the "DueDate" անուն, Ես ուզում եմ ավելացնել եւս դաշտ <CommonViewFields>. Using the Solomon technique, I was getting a column name like "XYZ_x0020_Project_x0020_Due_x00".

Ես մտածեցի ինքս ինձ, that’s clearly a truncated name. I went ahead and un-truncated it with no success. I finally used the seemingly truncated name and it worked.

Bonus tip: Երբ ես աշխատում CQWP, եթե ես ավելացրել է վատ ներքին անունը <CommonViewFields>, the CQWP would tell me that the query had returned no results. Սակայն, եթե ես ավելացրել է տվյալների տեսակի վրա, որպեսզի դաշտային անունը, it would return a result. Adding the data type actually masked a problem since I was referencing a non-existent field. I could add it, բայց երբ ես փորձեցի ցույց տալ իր արժեքը, I would always get a blank.

Սա չի դիմակ Սխալը:

<CommonViewFields>Due_x0020_Date;</CommonViewfields>

Սա այն դիմակ է սխալը:

<CommonViewFields>Due_x0020_Date,Datetime;</CommonViewfields>

</վերջ>

3 thoughts on "Արագ եւ հեշտ: Որոշել ներքին սյունակ անունը մի կայքի սյունակում

  1. Corey
    Using the "hover" technique isn’t too bad for one or two fields. But for massive lookups I use the Stramit Caml viewer ՈՒղեցույց. I actually like that one better than the U2U one — դա շատ արագ, եւ այն ստացել գեղեցիկ առանձնահատկությունն վերադարձնելու CAML որպես StringBuilder code.
  2. Waldek Mastykarz
    Որոշ ժամանակ առաջ ես կանգնած, նույնիսկ ավելի շատ հարցեր Բովանդակության տեսակներ ու սյուները: Ներքին անվանումները, Վերնագրեր Ա - Ֆ եւ ստատիկ անունները. Որոշ ժամանակ անց ես որոշեցի անել մի փոքր գործիք է օգնել ինձ կանչել ճիշտ անունները. Դուք չեք կարող է ունենալ տեսք, ինչպես նաեւ: http://www.sharepointblogs.com/tmt/archive/2007/08/24/imtech-fields-explorer.aspx

Թողնել Պատասխանել Paul Galvin Ավելացնել կարծիք Չեղարկել պատասխանել

Ձեր էլ. Փոստի հասցեն չի հրապարակվելու. Պահանջվող դաշտերը նշված են աստղանիշով *