Options

Help with BIGTEXT!!!

RubiaRubia Member Posts: 4
Hello!!


I would like to know how can I use the data type bigtext. And I would like also, to know how can I use the functions of the control.

If there is somebody that can help me, I would be so grateful.

Thanks.

Comments

  • Options
    jmjm Member Posts: 156
    Hi Rubia,

    there are functions like:
    - LENGTH
    - ADDTEXT
    - GETSUBTEXT
    - TEXTPOS
    - WRITE
    - READ

    the datatype BIGTEXT is new to version 4.0 and i did not use it so far.
    Have a look at the What's new white papers or
    the Application Designers guide in the Doc directory on the producht CD.

    Insert a variable definition in your code and try the C/AL Symbol menu (F5).

    br
    Josef Metz
    br
    Josef Metz
  • Options
    saikiransaikiran Member Posts: 22
    Hi Rubia and Josef,
    This is just a try to help you out with BigText.

    MBS Navision Reference Guide says:
    Use this complex C/AL data type to handle large text documents.
    This data type cannot be shown in a message window or be seen in the debugger. The maximum length of a BigText variable is 2,147,483,647 characters and this corresponds to 2 GB.

    You can use the BigText functions to manipulate a BigText variable, for example to extract part of a BigText variable or to add a text string to a BigText variable.
    The normal string functions cannot be used with a BigText variable.

    The Functions are:

    1. LENGTH
    Use this function to retrieve the length of a BigText variable.
    Length (data type - Integer) := BigText.LENGTH

    2. ADDTEXT
    Use this function to add a text string to a BigText variable. The string can be inserted anywhere in the Variable or added at the end of the variable.
    BigText.ADDTEXT(Variable [,Position])
    The datatype of the variable should be Text or BigText.
    If this 'Position' parameter is omitted, the string is added at the end of the BigText variable.

    3. GETSUBTEXT
    Use this function to retrieve part of a BigText variable.
    [RetLength] := BigText.GETSUBTEXT(Variable, Position [,Length])
    The RetLength is an Integer variable that gives you the Length of the Retrieved BigText.

    4. TEXTPOS
    Use this function to retrieve the position at which a specific string first occurs in a BigText.
    Position := BigText.TEXTPOS(String)

    5. WRITE
    Use this function to stream a BigText to a BLOB field in a table.
    The table you are writing to must contain a field of data type - BLOB.
    You will have to declare an OutStream to write the data.

    6. READ
    Use this function to stream a BigText that is stored as a BLOB in a table to a BigText variable.
    You will have to declare an InStream to read the data from the datatbase into the BigText variable.


    7. To delete the content in a BigText variable use the CLEAR function:
    CLEAR(BigText)

    For more details, use Navision C/SIDE Reference Guide.
  • Options
    RubiaRubia Member Posts: 4
    Thanks Saikiran, your answer has being a really good help for me.

    Bye
  • Options
    Timo_LässerTimo_Lässer Member Posts: 481
    BigText was primary introduced for to handle BLOB in XMLports.
    The BLOBs will be converted with the BASE64 encoding so that there will be a very long string as result which can be exported by the XMLports.
    BASE64 is one of the standards for E-Mail Attachments, so there should be many many tools for decoding the very very long text back into a BLOB.
    Timo Lässer
    Microsoft Dynamics NAV Developer since 1997
    MSDynamics.de - German Microsoft Dynamics Community - member of [clip]
Sign In or Register to comment.