Haraka na Easy: Kuamua Ndani Column Jina la Column Site

UPDATE: Jeremy Thake ina blogged kuhusu hili na kuweka baadhi kanuni kwa ajili ya maombi console kwamba inaonyesha majina ya ndani.

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", Mimi kudhani kwamba jina safu ya kutumia katika <CommonViewFields> is "Due_x0020_Date".

Vibaya!

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

Jinsi gani mimi kupata? I re-read Heather Suleimani blog kuingia kwenye kubadilisha 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" jina, Nilitaka kuongeza mwingine kwa shamba <CommonViewFields>. Using the Solomon technique, I was getting a column name like "XYZ_x0020_Project_x0020_Due_x00".

Mimi nilidhani, 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.

Ziada ncha: Wakati mimi alikuwa anafanya kazi na CQWP, kama mimi aliongeza mbaya ndani kwa jina <CommonViewFields>, the CQWP would tell me that the query had returned no results. Lakini, kama mimi aliongeza aina data kwa jina shamba, 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, lakini wakati nilijaribu kuonyesha thamani yake, I would always get a blank.

Hii si kufunika kosa:

<CommonViewFields>Due_x0020_Date;</CommonViewfields>

Hii hakuwa mask kosa:

<CommonViewFields>Due_x0020_Date,DATETIME;</CommonViewfields>

</mwisho>

3 mawazo juu ya "Haraka na Easy: Kuamua Ndani Column Jina la Column 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 kiungo. I actually like that one better than the U2U one — ni ya haraka sana na ni got hulka nzuri ya kurudi CAML kama StringBuilder kanuni.
    Kujibu

Kuondoka Reply

Anwani yako si kuchapishwa. Mashamba required ni alama *