Ажурирање: Jeremy Thake го блогираа за ова и да постават некои код за конзола апликација што покажува внатрешна имиња.
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. Најмалку, 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.
Бонус совет: Кога работев со 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>
</крајот>