Concatenate field details into single field

devinestormdevinestorm Member Posts: 7
Hi,

I'm new to Navision and this forum.

I was wanting some advise on how to concatenate several fields into one?

Basically I'm working on the "item" table and was wanting to concatenate information from a number of fields into the "description" field. All data is currently in this table, in some bespoke fields that we have setup.


TAHNKS :D

Answers

  • SavatageSavatage Member Posts: 7,142
    I assume you are making a processing report.

    description := format(field1)+format(field2)+format(field3);

    remember the desciption field has a specific length so if combining these makes the length longer than the field you will get an error. There are ways to handle that if that's the case. STRLEN, COPYSTR etc...
  • devinestormdevinestorm Member Posts: 7
    Hi Harry,

    Thanks for your quick response.

    I'm seriously new to this, but dont think I want to setup a "processing report"

    I wanted to change the "description" field to be a concatenation of 3 other fields.


    THANKS :D
  • mohana_cse06mohana_cse06 Member Posts: 5,504
    How do you want to do without a process report?
    do you have any plans?
  • devinestormdevinestorm Member Posts: 7
    Hi again,

    I was hoping it was a formula you could write..........

    I guess I will have to do some more research on the topic.

    THANKS AGAIN :D
  • SavatageSavatage Member Posts: 7,142
    You could do it at form level by changing the SourceExp of the field but I don't see the benefit.
    SourceExp::Description+' '+"Description 2"
  • devinestormdevinestorm Member Posts: 7
    THANKS - will go back to the drawing board :D
  • SavatageSavatage Member Posts: 7,142
    you have to go back and ask yourself why you need something like this.

    What are these other 3 fields.
    If you have fields already holding this information why do you need another.
    what happens if the three fields together are too long for the description field - which one get's cut off?
  • devinestormdevinestorm Member Posts: 7
    We had a meeting today and it was raised that the description could contain various bits of information. We use this field on various documents (invoices etc).

    It was to save duplicaiton of input, but I guess a better way to do it, would be to concatenate the reports/invoices etc......

    ps - on the forum info it said to mark posts as closed........ how do I do this? (cant seem to find it anywhere)..........
  • SavatageSavatage Member Posts: 7,142
    Much easier to do it on reports!

    Plus when you combine fields using the source exp - you can't filter on the field anymore.

    to mark as solved - edit first post and select the attibute..solved
  • devinestormdevinestorm Member Posts: 7
    Thanks for all your help :D
Sign In or Register to comment.