Money field values are empty When a linked datasource which merge two sublists is displayed in page !
-
17 มีนาคม 2555 0:47
Hi,all
Money field values are empty When a linked datasource which merge two same structured sublists is displayed in page ?
Thanks.
ตอบทั้งหมด
-
19 มีนาคม 2555 8:26ผู้ดูแล
Hi cxr,
Base on my test, when we created a linked data source and display it in XSLT list view web part and data view web part. Then click Add/Remove Columns button on SharePoint Designer to add the Currency field to the web part or select a currency field to insert it as Single/Multiple Item View , it will display empty.
Please replace following line (Here currency is the name of my currency column.)
<xsl:value-of select="format-number(@currency, '#,##0.00;-#,##0.00')" />
with
<xsl:value-of select="@currency" />
to resolve this issue.
Note: If it is a joined linked data source and the currency field is in the second list, please select some fields in the first list to display in the data view web part first, then select the currency field in the second list together with the other necessary fields, and insert them as joined subview. Then remove the format-number function from it.
The reason why we need to remove the format-number formula from the currency field is a currency field stores value like this: $20.0 ( currency symbol + number). But format-number can only use to format a number, so format-number function will fail to format a currency field and display empty.
Best regards,
EmirBest regards,
EmirEmir Liu
TechNet Community Support
-
19 มีนาคม 2555 12:39
Hi,Emir
Thanks for your reply.
The number field is also displayed empty !
Best regards,
cxr
-
20 มีนาคม 2555 2:28ผู้ดูแล
Hi cxr,
Could you please tell us what a lists structure you used to create the linked data source and how you insert it to the XSLT/Data View web part? And please right click the currency field under the Data Source Details pane in SharePoint Designer > Insert it as Text, can you get it display in the web part?
And if you are using join linked data source and the list contains the currency field is the second list you use to insert to the web part, only the items satisfied the matching conditions will display, you may check these items whether their currency field has value or not.
Best regards,
EmirEmir Liu
TechNet Community Support
-
20 มีนาคม 2555 14:19
Hi,Emir
Thanks for your reply.
I just merge(not join) more than two lists which structure is like name,salary,ect in a linked datasource and then is displayed in the page through inserting dataview.the name field type is single line text ,and the value is always displayed right. when the salary field type is money or numric ,The value is displayed empty !
Best regards,
cxr
-
20 มีนาคม 2555 19:09
try using a "./" in front of the field name:
<xsl:value-of select="format-number(./@currency, '#,##0.00;-#,##0.00')" />
Brian T. Shell
-
21 มีนาคม 2555 5:34ผู้ดูแล
Hi cxr,
Could you please try the following step again:
- Click Insert > Data View > Select your merge data source. (Data View web part added this way will create a XSLT list view web part)
- If the salary field hasn't been added to the XSLT list view web part, please click the Add/Remove Columns button under Options button on the ribbon, select your salary field.
- Swith to Code view, find following code.
<xsl:value-of select="format-number(@your_salary_field_name, '#,##0.00;-#,##0.00')" /> - Replace it with
<xsl:value-of select="@your_salary_field_name" /> - Done.
Best regards,
EmirEmir Liu
TechNet Community Support
- ทำเครื่องหมายเป็นคำตอบโดย cxr 21 มีนาคม 2555 6:53