Tez və asan: Site Sütun Daxili Sütun adı müəyyən

UPDATE: Jeremy Thake Bu barədə blogged və bir qədər qoymuşdur bir konsol tətbiqi üçün kod daxili adları göstərir ki,.

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", Mən sütun adını istifadə etmək güman <CommonViewFields> is "Due_x0020_Date".

Yanlış!

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

Nasıl almısan? I re-read Heather CQWP değiştirmeyle haqqında Süleymanın blog giriş 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" ad, Mən başqa sahədə əlavə etmək istədi <CommonViewFields>. Using the Solomon technique, I was getting a column name like "XYZ_x0020_Project_x0020_Due_x00".

Özümə düşündüm, 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 ipucu: Mən CQWP ilə iş zaman, Mən pis bir daxili adı eklendiğinde <CommonViewFields>, the CQWP would tell me that the query had returned no results. Lakin, Mən sahədə adı bir veri növü eklendiğinde, 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, amma onun dəyəri keçirmək üçün cəhd zaman, I would always get a blank.

Bu səhv maska ​​etməyib:

<CommonViewFields>Due_x0020_Date;</CommonViewfields>

Bu səhv maska ​​idi:

<CommonViewFields>Due_x0020_Date,DateTime;</CommonViewfields>

</son>

3 Haqqında "fikirləriTez və asan: Site Sütun Daxili Sütun adı müəyyən

  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 keçid. I actually like that one better than the U2U one — çox tez və daha StringBuilder kodu kimi CAML qaytarılması gözəl xüsusiyyət var.
    Cavab

Bir cavab buraxın Paul Galvin Cavab ləğv

E-poçt ünvanından dərc olunmayacaq. Lazım alanlar qeyd olunur *