Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website

Unable to add meta point as context to itself


  • Heya,

    I am trying to create a meta data point so that once the user updates its value, a script is executed to update other points. According to the point details help, I should be able to add itself to the context once the point has been initially saved.

    0_1558033082192_8559359a-d95a-45f2-b931-f64d42c449b1-image.png

    Once the point has been created and saved, I see the point in the script context droplist but when I try to select it, nothing happens. I can add other points without issue but not the current point. I have refreshed the data sources page just in case but that didn't help. I thought the point needed to be enabled but that didn't help.

    I'm I missing something?

    Thanks
    Ian

    PS: the help window is a bit out-of-date as it refers to clicking a plus sign to add a point to the context.


  • Hi iperry,

    The meta point should already be in its context, then, under the variable my

    A meta point cannot trigger its own execution on context update, to avoid infinite loops. Setting a value to a meta point just saves that value. Hitting the refresh button on a meta point triggers a script execution.


  • Hi @phildunlap

    Ahh, ok makes sense that meta point cannot trigger its own execution to avoid loops. I guess the way I read the overview in the pop-up help lead me to think that.

    Hitting the refresh button on a meta point triggers a script execution.

    Where is this button? This might have potential.

    Thanks
    Ian


  • You can find the button on the data point details page, next to the current value.

    There is also the /rest/v1/runtime-manager/force-refresh/{xid} REST endpoint (which is what that button is calling).

    Then there is the RuntimeManager context object in scripts, which also has a function to trigger a refresh of a data point (or even a data source) if supported, like so:

    RuntimeManager.refreshDataPoint("DP_XID"); //.refreshDataSource("DS_XID")