• Recent
    • Tags
    • Popular
    • Register
    • Login

    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 Mango 5 Documentation Website

    Require second string in json using a regular expression.

    Mango Automation general Discussion
    3
    6
    3.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      burslem2001
      last edited by

      Hello,

      I'm new to mango. I'm importing a pointLocator with a regular expression:

      "valueRegex":""id":"50009","type":"controlfunctionasset".?"ReferenceInput":"(.?)",".*?"cmddata""

      {"assets":{"controlfunctionasset":[{"id":"50009","type":"controlfunctionasset","label":"VOLTAGE_REGULATION_CF","model":"voltageregulation","extant":"true","Ts":"0.017","Enabled":"false","Hold":"false","Reset":"false","ResetValue":"0.000","Output":"0.000","UpperLimitHit":"false","LowerLimitHit":"false","OperationFault":"false","ExternalFault":"false","ReferenceInput":"0.000","DebugLevel":"0","Initialized":"true","Gain":"1.000","PreGainOutput":"0.000","CompareInput":"0.000","CompareInputGain":"1.000","LimHi":"false","LimLo":"false","Vtest1":"0.000","Deadband":"0.010","MaxCommand":"1.000","MinCommand":"-1.000","Kv":"1.000","Kgv":"1.000","Kpv":"0.000","Kiv":"1.000","Krv":"1.000","Kdroopv":"0.000","Slew":"9.000","SlewDef":"1.000","QtestActive":"false","QtestCmd":"0.000","Unwind":"false","UsePControlOnly":"false","KpvActive":"0.000","KdroopvActive":"0.000","VRef":"0.000","Qvr":"0.000","PiErr":"0.000","POutput":"0.000","IOutput":"0.000","DroopSignal":"0.000","RampInput":"0.000","RampOutput":"0.000","cmddata":{"Enabled":"false","Hold":"false","Reset":"false","ResetValue":"0.000","ExternalFault":"false","ReferenceInput":"480.000","CompareInput":"0.000","MaxCommand":"2000.000","MinCommand":"-2000.000","Deadband":"4.800","Kv":"100.000"}}]}}

      I would like the ReferenceInput after the cmddata? Not the first one. Dont know how the valueRegEx works? Is there a test site or tool I can use?

      Much Appreciated,
      Gary C

      1 Reply Last reply Reply Quote 0
      • B
        burslem2001
        last edited by

        "xid":"DP_50009_1",
        	"loggingType":"ON_CHANGE",
        	"intervalLoggingPeriodType":"MINUTES",
        	"intervalLoggingType":"INSTANT",
        	"purgeType":"YEARS",
        	"pointLocator":{
        		"dataType":"NUMERIC",
        		"ignoreIfMissing":false,
        		"timeFormat":"",
        		"timeRegex":"",
        		"valueFormat":"",
        		"valueRegex":"\"id\":\"50009\",\"type\":\"controlfunctionasset\".*?\"ReferenceInput\":\"(.*?)\",\".*?\"cmddata\""
        

        The above is the datapoint I'm importing.

        1 Reply Last reply Reply Quote 0
        • B
          burslem2001
          last edited by

          I’m using mango to do this so. It will use a HTTP request to get the data which is returned in json.

          1 Reply Last reply Reply Quote 0
          • phildunlapP
            phildunlap
            last edited by

            If I'm understanding the problem correctly, the ordering of the JSON is guaranteed and you want the second ReferenceInput value, i.e.

            "valueRegex":""id":"50009","type":"controlfunctionasset".?ReferenceInput.?"ReferenceInput":"(.?)",".?"cmddata""

            regexpal.com has been useful to me.

            1 Reply Last reply Reply Quote 0
            • L
              Lauren23
              last edited by

              When delete a datapoint, the meta datapoint used this datapoint will be affect, Can do some caution when delete one datapoint which be used in another meta point. :mrgreen: :oops:


              We are the pioneers in providing [url=http://www.testking.co.uk/exam/312-50v8.html]testking.co.uk dumps and [url=http://www.ism.ws/]ISM tutorials with 100% exam pass [url=http://www.colorado.edu/]University of Colorado at Boulder Download our latest testking ccie & [url=http://en.wikipedia.org/wiki/Aruba]wikipedia questions to pass real exam of mcitp training[url=http://www.fcc.edu/]Johnson University Florida

              1 Reply Last reply Reply Quote 0
              • First post
                Last post