I need to display the value of a SQL Label in a Umbraco List View.
I'm displaying in the Document the total of page views for that page, the value is returned from a custom table in umbraco.
In the document the value appears fine. The problem is in the List View i added the property to appear but is returning always empty.
For this i created a property of the type nupickers Sql Labels, and my sql expression is
SELECT nodeid AS 'Key',
[views] AS 'Label'
FROM hitcounter
WHERE node_id = @contextId
Good to hear it's working as expected on the document, but I suspect the reason the label is failing in the List View, is that the value is populated on load of the document being edited (as it's not a value saved on the document itself).
Hi Hendy,
Yes the value is not saved on the document itself.
It´s a pageview counter from a custom table.
I could do this with the package "Visit Counter"., but every time the page is viewed the document is saved. The site has too many visits, and could slow down the performance of the site.
This is a news site and it would be nice to see this values in the listview. It´s not pratical to enter the document to see the page views.
What you are telling me is that is not possible to show the value in the List view?
Empty SQL Label in List View
I need to display the value of a SQL Label in a Umbraco List View. I'm displaying in the Document the total of page views for that page, the value is returned from a custom table in umbraco.
In the document the value appears fine. The problem is in the List View i added the property to appear but is returning always empty.
For this i created a property of the type nupickers Sql Labels, and my sql expression is
SELECT nodeid AS 'Key', [views] AS 'Label' FROM hitcounter WHERE node_id = @contextId
Hi Rodrigo,
Good to hear it's working as expected on the document, but I suspect the reason the label is failing in the List View, is that the value is populated on load of the document being edited (as it's not a value saved on the document itself).
Hi Hendy, Yes the value is not saved on the document itself. It´s a pageview counter from a custom table.
I could do this with the package "Visit Counter"., but every time the page is viewed the document is saved. The site has too many visits, and could slow down the performance of the site.
This is a news site and it would be nice to see this values in the listview. It´s not pratical to enter the document to see the page views.
What you are telling me is that is not possible to show the value in the List view?
Best Regards
is working on a reply...