8 Replies Latest reply: Nov 16, 2017 11:55 AM by Vishwarath Nagaraju RSS

    Data being brought in as 0 or -1

    Diwas Karki



      I am doing a length comparison, and trying to bring different fields based on different conditions.


      "String4" sometimes holds a date: "Wed,Feb 17 10:35:45 CST 2016" and sometimes a request ID: "DEZ21476208303201".

      Im trying to bring the date held in "ATTRIBUTES", which is an xml, when string4 > 14 and when string4<14, I want to bring string4 as Completed_Date.

      This is what my script looks like:

      If(INSTANCE='Auto Fire Role Access Request', STRING3='Complete' AND len(STRING4)<14,TextBetween(ATTRIBUTES, '<entry key="Completed On" value="','"')),
      If(INSTANCE='Auto Fire Role Access Request', STRING3='Complete' AND len(STRING4)>14, STRING4) As Complete_Date,


      This is what "ATTRIBUTES" field look like:




          <entry key="Business Case" value="test group created for some qlikview testing work"/>

          <entry key="Create New Group" value="DK_B2E_QLIKVIEWTEST"/>

          <entry key="Platform/Environment" value="Existing / LDAP - B2E Test"/>

          <entry key="Request Type" value="Create Single Group"/>

          <entry key="Requested By" value="Diwas Karki (E1R1)"/>

          <entry key="Requested On" value="Wed, Nov 1 17:06:58 CDT 2017"/>





      Complete_Date is bringing in 0 or -1. Data should look like Wed,Feb 17 10:35:45 CST 2016. I would really appreciate any help.