This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Customized Custom Properties Resource

Create your own customized version of the Custom Properties Resource

  1. Start by adding a new ‘Custom HTML’ resource to your ‘Node Details’ view. 
  2. Edit the newly added Custom HTML resource then copy and paste the code snip-it below into the HTML codeblock field.

<table id="custompropertieslist" class="NeedsZebraStripes">

</table>

<script>

  1. Information.Query("SELECT Field FROM Orion.CustomProperty WHERE Table='NodesCustomProperties'", function(result) {

var cps = [];

for (var y = 0; y < result.Rows.length; y++) cps.push(result.Rows[y][0]);

  1. Information.Query("SELECT " + cps + " FROM Orion.NodesCustomProperties Where NodeId = ${NodeId}", function(result) {

for (var x = 0; x < result.Columns.length; x++) $("#custompropertieslist").append('<tr><td>' + cps[x] + '</td><td>' + (result.Rows[0][x] || '') + '</td></tr>');

}, function(error) {});

}, function(error) {});

</script>

  1. Adjust the ‘Title’ and/or ‘Subtitle’ of the resource to your liking
  2. Click ‘Submit’ to save your changes

You should now have a new resource on your Node Details page similar to the following

pastedImage_3.png

  • Hi  

    I really like this new feature of Information.Query from within Custom HTML, saves us writing the AJAX code.  

    Any chance you could share more examples on Information.Query ? need to explore more of it's capabilities. 

    Also any chance you could share example on posting / updating values from within Custom HTML. I am looking to have the ability of putting the members of group in maintenance mode at a click of link or button in HTML.

    Thanks Abdullah