Options

XML port problem

2dai2dai Member Posts: 3
edited 2011-04-12 in NAV Three Tier
I have an xml port with a field that repeats three times, and i want to pass these fields to a table, but i can't pass the three fields to the table because the first field that I want to pass to a table is overwrited by the second, and second field in my table stays empty. After that, the first field of my table is overwriten again by the third field of the xml port, doing the same and leaving empty the second and the third fields of my table.

thanks! :P

Comments

  • Options
    jlandeenjlandeen Member Posts: 524
    I think it would help if you just used a text element instead of assigning the value to a field on a table and then handled the insert programitcally yourself. This would allow you to read the values as they were parsed out fo the XML into an array or otherwise handle each item individually. You'll probably have to use the OnAfterAssignVariable trigger.

    There was a very similar type question posted already that I responded too...see below.

    See my other post here: http://www.mibuso.com/forum/viewtopic.php?f=23&t=46858
    Jeff Landeen - Sr. Consultant
    Epimatic Corp.

    http://www.epimatic.com
  • Options
    2dai2dai Member Posts: 3
    I just started with Navision, in fact I'm making practices, so I do not understand very well.
    in my xml I have these fields

    <LISTA_TELEFONOS>
    - <TELEFONOS>
    <TIPO_TELEFONO> xxxxxx </TIPO_TELEFONO>
    <TELEFONO> xxxxxxxxx </TELEFONO>
    <COMENTARIO> xxxxxxxxx </COMENTARIO>
    </TELEFONOS>
    - <TELEFONOS>
    <TIPO_TELEFONO> xxxxxxxxx </TIPO_TELEFONO>
    <TELEFONO> xxxxxxxxx </TELEFONO>
    <COMENTARIO />
    </TELEFONOS>
    - <TELEFONOS>
    <TIPO_TELEFONO> xxxxxxxxx </TIPO_TELEFONO>
    <TELEFONO> xxxxxxxxx </TELEFONO>
    <COMENTARIO> xxxxxxxxx </COMENTARIO>
    </TELEFONOS>
    </LISTA_TELEFONOS>

    I want to pass this data to a table, but I overwrite the same name as the fields, leaving me the last 2 empty.

    do not know if it will be easier to understand
  • Options
    jlandeenjlandeen Member Posts: 524
    I would suggest that you review a related post as it may highlight some additional information and the trigger and approach to solve your problem.

    http://www.mibuso.com/forum/viewtopic.php?f=23&t=46858&p=229426#p229426

    Basically I would use the OnAfterAssignVariable trigger of the TELEPHONOS element - as it appears thats the element that repeats several times in your XML.
    Jeff Landeen - Sr. Consultant
    Epimatic Corp.

    http://www.epimatic.com
Sign In or Register to comment.