Can I create dynamic columns/grid with BloX?

Comments

3 comments

  • Avatar
    Ron Oren

    Hi Diego

    A) Attached below is the code from the Multiple Indicator template ( also available in your version), I think this will do the job - LMK.

    B) This Wednesday we will release the new version of BloX ( v2.0) I suggest you work with this version as it contains more customization and design options.

     

    C) very cool use case! :) please keep on sharing.

     

    Ron

     

    {
    "type": "AdaptiveCard",
    "version": "1.0",
    "style": "",
    "script": "",
    "title": "",
    "showCarousel": true,
    "backgroundImage": "",
    "body": [
    {
    "type": "TextBlock",
    "text": "Social Status",
    "size": "extralarge",
    "color": "default",
    "weight": "bold",
    "horizontalAlignment": "center"
    },
    {
    "type": "TextBlock",
    "text": "{panel:Date}",
    "spacing": "medium",
    "horizontalAlignment": "center",
    "color": "default",
    "size": "medium",
    "weight": "light"
    },
    {
    "type": "ColumnSet",
    "spacing": "extralarge",
    "columns": [
    {
    "type": "Column",
    "separator": true,
    "spacing": "medium",
    "items": [
    {
    "type": "Image",
    "url": "/plugins/BloX/blox-images/MultipleIndicators/google_plus.png",
    "spacing": "small",
    "horizontalAlignment": "center",
    "size": "Medium"
    },
    {
    "type": "TextBlock",
    "size": "light",
    "weight": "light",
    "horizontalAlignment": "center",
    "spacing": "medium",
    "color": "default",
    "text": "{panel:Google} views"
    }
    ],
    "selectAction": {
    "type": "Action.OpenUrl",
    "url": "https://www.sisense.com/sisense-labs/"
    }
    },
    {
    "type": "Column",
    "items": [
    {
    "type": "Image",
    "spacing": "small",
    "horizontalAlignment": "center",
    "url": "/plugins/BloX/blox-images/MultipleIndicators/facebook.png",
    "size": "Medium"
    },
    {
    "type": "TextBlock",
    "size": "light",
    "weight": "light",
    "horizontalAlignment": "center",
    "spacing": "medium",
    "color": "default",
    "text": "{panel:Facebook} views"
    }
    ],
    "selectAction": {
    "type": "Action.OpenUrl",
    "url": "https://www.sisense.com/sisense-labs/"
    }
    },
    {
    "type": "Column",
    "items": [
    {
    "type": "Image",
    "spacing": "small",
    "horizontalAlignment": "center",
    "url": "/plugins/BloX/blox-images/MultipleIndicators/instagram.png",
    "size": "Medium"
    },
    {
    "type": "TextBlock",
    "size": "light",
    "weight": "light",
    "horizontalAlignment": "center",
    "spacing": "medium",
    "color": "default",
    "text": "{panel:Instagram} views"
    }
    ],
    "selectAction": {
    "type": "Action.OpenUrl",
    "url": "https://www.sisense.com/sisense-labs/"
    }
    }
    ]
    },
    {
    "type": "TextBlock",
    "text": " ",
    "spacing": "extralarge"
    },
    {
    "type": "TextBlock",
    "text": " ",
    "spacing": "extralarge"
    },
    {
    "type": "ColumnSet",
    "columns": [
    {
    "type": "Column",
    "separator": true,
    "spacing": "medium",
    "items": [
    {
    "type": "Image",
    "horizontalAlignment": "center",
    "url": "/plugins/BloX/blox-images/MultipleIndicators/twitter.png",
    "spacing": "small",
    "size": "Medium"
    },
    {
    "type": "TextBlock",
    "size": "light",
    "weight": "light",
    "spacing": "medium",
    "horizontalAlignment": "center",
    "color": "default",
    "text": "{panel:Twitter} views"
    }
    ],
    "selectAction": {
    "type": "Action.OpenUrl",
    "url": "https://www.sisense.com/sisense-labs/"
    }
    },
    {
    "type": "Column",
    "separator": false,
    "spacing": "medium",
    "items": [
    {
    "type": "Image",
    "horizontalAlignment": "center",
    "url": "/plugins/BloX/blox-images/MultipleIndicators/linkedin.png",
    "spacing": "small",
    "size": "Medium"
    },
    {
    "type": "TextBlock",
    "size": "light",
    "weight": "default",
    "spacing": "medium",
    "horizontalAlignment": "center",
    "color": "default",
    "text": "{panel:LinkedIn} views"
    }
    ],
    "selectAction": {
    "type": "Action.OpenUrl",
    "url": "https://www.sisense.com/sisense-labs/"
    }
    },
    {
    "type": "Column",
    "separator": false,
    "spacing": "medium",
    "items": [
    {
    "type": "Image",
    "horizontalAlignment": "center",
    "url": "/plugins/BloX/blox-images/MultipleIndicators/youtube.png",
    "spacing": "small",
    "size": "Medium"
    },
    {
    "type": "TextBlock",
    "size": "light",
    "weight": "default",
    "spacing": "medium",
    "horizontalAlignment": "center",
    "color": "default",
    "text": "{panel:YouTube} views"
    }
    ],
    "selectAction": {
    "type": "Action.OpenUrl",
    "url": "https://www.sisense.com/sisense-labs/"
    }
    }
    ]
    },
    {
    "type": "TextBlock",
    "text": " ",
    "spacing": "large"
    }
    ],
    "actions": [
    {
    "type": "Action.OpenUrl",
    "title": "Open In Web",
    "url": "https://www.sisense.com/sisense-labs/"
    }
    ]
    }

    0
    Comment actions Permalink
  • Avatar
    Diego Cordero

    Hi Ron, 

    Thanks for your response. I considered that option but it's not dynamic in the sense that I would need to hardcode every image, artist name and track name to the different elements in the grid. In this template. If I have a table of New Releases that gets updated daily (or weekly), the tracks will change and I would need to replace them every time.

    Thanks!

    Diego

    0
    Comment actions Permalink
  • Avatar
    Ron Oren

    Sure, in this case just reference that table from your BloX widget, as {panel:New Releases}and so-on to all the other dynamic data points from your cube.

    Please do remember to upgrade to BloX version 2 to enjoy more capabilities.

     

    A cool idea might be is to create your own custom action and trigger a song from your BloX widget :)

     

    Ron

    0
    Comment actions Permalink

Please sign in to leave a comment.