In the last post I had been investigating if it was possible to view the fields that are created by the "Administrator Approved" InfoPath forms. After a little tip from Adri Verlaan from Microsoft, I have been able to get the columns to render. To begin one the main issue was finding the actual field names that are being used. Using CAML you are able to find these but there is another simple way of doing this. The process is quite simple. It involves creating a new style and simply getting the style to render the internal names of the fields. To do this I have created a new style shown below:
Notice that the following lines:
The above lines will simply render the internal names that are actually being presented to the CQWP. When the CQWP renders it should look as below:
What I noticed here was that the field names were actually different to the CAML query names when presented to the CQWP. One of the fields within the CAML code was:
e21843e8_x002d_cd45_x002d_4185_x002d_88a0_x002d_368251a2382c
When it was shown in the CQWP it was actually the following:
e21843e8_x005F_x002d_cd45_x005F_x002d_4185_x005F_x002d_88a0_x005F_x002d_368251a2382c
As you can see they are quite different. Now that we have the real internal names that the CQWP uses I modified the CQWP properties as shown below:
Once these changes have been made the "ItemStyle.xsl" file will also need changing to the following:
Now when we put this all together it renders as shown below (ignore the formatting – it's just a demo).
What we can do to make life easier is to use the "DataColumnRename" property of the CQWP as per a comment from Adri Verlaan from Microsoft to rename the columns to something that makes a little more sense than the long GUID type names. In a further post we will look at this. J |