Quick dhe Easy: Përcaktoni Emri Brendshëm kolonë e një Shtylle Site

UPDATE: Jeremy Thake ka blogged në lidhje me këtë dhe vënë disa Kodi për një aplikim konsol që tregon emrat e brendshme.

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", Unë supozohet se emri kolona për të përdorur në <CommonViewFields> is "Due_x0020_Date".

I gabuar!

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

Si e kam gjetur atë? I re-read Heather Blog entry Salomonit mbi modifikimin 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" emër, Doja të shtoni një tjetër fushë për të <CommonViewFields>. Using the Solomon technique, I was getting a column name like "XYZ_x0020_Project_x0020_Due_x00".

Mendova për veten time, 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: Kur isha duke punuar me CQWP, në qoftë se unë shtoi një emër të keq të brendshëm për <CommonViewFields>, the CQWP would tell me that the query had returned no results. Por, në qoftë se unë shtoi një lloj të dhënave për emrin në terren, 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, por kur unë u përpoq për të shfaqur vlerën e saj, I would always get a blank.

Kjo nuk ka maskë gabimin:

<CommonViewFields>Due_x0020_Date;</CommonViewfields>

Kjo ka maskë gabimin:

<CommonViewFields>Due_x0020_Date,DateTime;</CommonViewfields>

</fund>

3 mendime mbi "Quick dhe Easy: Përcaktoni Emri Brendshëm kolonë e një Shtylle Site

  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 lidhje. I actually like that one better than the U2U one — kjo është shumë e shpejtë dhe ajo mori veçori e bukur kthehej CAML si StringBuilder kod.

Lini një Përgjigju me Paul Galvin Cancel përgjigje

Adresa juaj e emailit nuk do të publikohet. Fusha e kërkuar janë shënuar *