Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
6 replies Latest Post - ‏2014-03-03T18:41:22Z by strathglass
strathglass
strathglass
105 Posts
ACCEPTED ANSWER

Pinned topic DBE field() - any workaround for 999 character limit in get()?

‏2014-02-26T19:20:36Z |

Looks like if you enter a string in a DBE field() element, the get() operation will only return the first 999 characters.

Is there any workaround to allow reading all of the input string?

Or do I have to make the user put the string in a file and read it in that way, allowing them to specify the file instead of the string directly?

-S

Updated on 2014-02-26T19:25:03Z at 2014-02-26T19:25:03Z by strathglass
  • llandale
    llandale
    2956 Posts
    ACCEPTED ANSWER

    Re: DBE field() - any workaround for 999 character limit in get()?

    ‏2014-02-26T20:34:32Z  in response to strathglass

    I don't think so.

    I wonder if the limit is really 968?  The following displays the max length for "string" attributes; which I presume is the same for "field" DBEs.

    • print maximumAttributeLength ""

    Seems to me you would use a "field" for relatively short string input, otherwise use a "text" box; using the same reasoning when deciding if an attribute should be type "string" or "text".

    -Louie

    • strathglass
      strathglass
      105 Posts
      ACCEPTED ANSWER

      Re: DBE field() - any workaround for 999 character limit in get()?

      ‏2014-02-26T20:45:41Z  in response to llandale

      I tested and confirmed that field() will return 999 characters but no more.

      You are right about text() - that did the trick, should have thought of that!

      (But get() for text and field DBEs returns the same thing - string, would have been good if they had clarified the difference in the DXL help file!)

       

      Thanks Louie!

       

      -S

      • llandale
        llandale
        2956 Posts
        ACCEPTED ANSWER

        Re: DBE field() - any workaround for 999 character limit in get()?

        ‏2014-02-28T16:38:19Z  in response to strathglass

        I believe you can insert EOL and Line-Feed characters into a "Text" DBE, but not a "Field" DBE. 

        Note also the existance of a "richText" DBE, allowing bolding et tal and OLE diagrams.  IIRC, you had to "get" mindfully but I don't recall why.

        Note also the existance of a "richField" allowing basic bolding et tal.

        -Louie

      • llandale
        llandale
        2956 Posts
        ACCEPTED ANSWER

        Re: DBE field() - any workaround for 999 character limit in get()?

        ‏2014-02-28T16:48:51Z  in response to strathglass

        Curious, you can type, paste, and "set()" more than 999 into the field, but the "get()" only gets the 1st 999.  Seems to me if they are going to restrict it, then they should also disallow the field from ever containing more in the 1st place.

    • pommCannelle
      pommCannelle
      41 Posts
      ACCEPTED ANSWER

      Re: DBE field() - any workaround for 999 character limit in get()?

      ‏2014-03-03T15:17:40Z  in response to llandale

      The string type is abble to contain much more than 968 characters ...

      string s = ""; int i
      for i in 0:1000 do s = s "1234567890"
      print length(s) "\n"
      print s[10000:10009] ""

      The maximumAttributeLength constant concerns string attributes only ;)
      Seems that containers (like attribute/968, field/999, richField/4072 ... ) have their own size restrictions ...

      • strathglass
        strathglass
        105 Posts
        ACCEPTED ANSWER

        Re: DBE field() - any workaround for 999 character limit in get()?

        ‏2014-03-03T18:41:22Z  in response to pommCannelle

        Interesting, thanks for clarifying.