Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Rodrigo 27 posts 100 karma points
    May 24, 2021 @ 13:28
    Rodrigo
    0

    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

  • Hendy Racher 863 posts 3849 karma points MVP 2x admin c-trib
    May 24, 2021 @ 19:12
    Hendy Racher
    0

    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).

  • Rodrigo 27 posts 100 karma points
    May 25, 2021 @ 09:15
    Rodrigo
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft