Table Copy from Property:Caption to Property:Name

nav_studentnav_student Member Posts: 175
Hi guys,

i this issue.

I have imported several objects that have the Property:Name in German and i want to copy the Caption property (English), on several fields.
How can i accomplish that?

Example:
Situation
NameÜbertragungsnr. alt ->German
CaptionTransmission No. old ->English


Result
NameTransmission No. old ->English
CaptionTransmission No. old ->English


Thanks for your atention.

Best Regards.

Comments

  • vaprogvaprog Member Posts: 1,141
    For Objects / Fields, you can read and modify NAVs Object and Field tables.

    For any text literal you can use Translate - export / import and modify the files before import.

    In either case, the object's Date, Time and Modified properties will be changed. There is a Dataport in the Update toolkit to save/restore those.
  • lvanvugtlvanvugt Member Posts: 774
    Hi,
    Find a (classic) report .txt object REP50000 (Copy Caption from Name) here that would do the job for. Of course you should test it on a number of dummy tables.
    Regarding the following:
    vaprog wrote:
    In either case, the object's Date, Time and Modified properties will be changed. There is a Dataport in the Update toolkit to save/restore those.
    If you are working on NAV 2013 that dataport will not help you. Find a xmlport that will do the same here: How-to: Reset Object Properties After Importing a UI Translation (NAV 2013).
    Luc van Vugt, fluxxus.nl
    Never stop learning
    Van Vugt's dynamiXs
    Dutch Dynamics Community
  • nav_studentnav_student Member Posts: 175
    Hello guys,

    thanks for your help.

    lvanvugt i try the object REP50000 , but it´s not working.
    Here are the steps that i have follow:

    Ctr+R - Run the Report

    On the Tab Field_Before
    TableNo - i put the id for my table
    Field Caption - <i leave blank>

    On the Tab Field_After
    TableNo - i put the id for my table
    FieldName - <i leave blank>

    I´m doing the right way?


    vaprog how can i use Translate - export / import and modify the files before import? using Dynamics NAV?notepad?

    Thanks again for your help.
  • lvanvugtlvanvugt Member Posts: 774
    edited 2013-08-02
    lvanvugt i try the object REP50000 , but it´s not working.
    Don't know why it's not working, but to make it somewhat easier I have uploaded a updated version to my SkyDrive.
    vaprog how can i use Translate - export / import and modify the files before import? using Dynamics NAV?notepad?
    If you do not have special tool for it that can process the translate export I would refrain from this as it is a lot of manual work you might better do in NAV.
    Luc van Vugt, fluxxus.nl
    Never stop learning
    Van Vugt's dynamiXs
    Dutch Dynamics Community
  • vaprogvaprog Member Posts: 1,141
    vaprog how can i use Translate - export / import and modify the files before import? using Dynamics NAV?
    Use Translate Export on an object you are interested in. Look at the file, it's a text file with a format which can easily be modified in any text editor or text manipulation program.
    You do net need to keep all the lines, you can throw out all you are not interested in.
    The format of each line is basically:
    <String identifier>:<translatable text>
    String identifier = <Object>{-<Element>}[-<Language>]-<max length>
    
    Object = <Object Type><ID>
    Object Type = #T=Table, F=Form, R=Report ...#
    ID = #content of the ID property#
    Element = <Element Type><ID>
    Element Type = #F=Field, P=Property, C=Control, D=Dataitem, S=Section, Q=Textconstant, V=Variable, X=Text Literal or comment, M=Menuitem, ...
    Language = A<Windows Language id> #1033=English, 1031=German, ...#
    Max Length= L<Length> #length in characters#
    
    Legend:
    <...> element that is defined elsewhere
    {...} repeatable components
    [...] optional components
    #...# prose

    So, in your case, you can search for any line with '-A1033-', see whether there is a corresponding name property, modify that line and throw out all the rest.

    I would use perl for the task, but sed, awk, or grep/find/findstr and a text editor will do.

    I only briefly looked at lvanvugt's report. You will likely have to modify the value of the Date property to be able to import or compile it.
    In spite of it's name (Copy Caption from Name), his report copies the English caption to the name property.
  • lvanvugtlvanvugt Member Posts: 774
    vaprog wrote:
    I only briefly looked at lvanvugt's report. You will likely have to modify the value of the Date property to be able to import or compile it.
    In spite of it's name (Copy Caption from Name), his report copies the English caption to the name property.
    Thanx for checking. Have changed the object naming to Copy Name from Caption .
    Luc van Vugt, fluxxus.nl
    Never stop learning
    Van Vugt's dynamiXs
    Dutch Dynamics Community
Sign In or Register to comment.