Looking for something, but can't find it.

dohertykdohertyk Member Posts: 94
Okay..

This is really going to help me out when it comes to programming something in SQL.

When writting SQL, and you want to reference something from Navision such as a drop down list that might keep track of someone's favourite colors.

Currently what I would have to do is look for 0,1,2,3... etc.

Where does Navision store the associated name. Such as "Black, Blue, Red, Green, White"

If you know what I'm talking about, can you send me back the information that I am looking for.

Thanks in advance,

Kevin

Answers

  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    In Navision you can define a field type Option. Internaly this will be stored as an integer but the system will show the optionvalues to the enduser.
  • dohertykdohertyk Member Posts: 94
    In Navision you can define a field type Option. Internaly this will be stored as an integer but the system will show the optionvalues to the enduser.

    Hi Mark,

    Thank you for the promptness of your reply. You've understood the problem, however the answer you supplied isn't what I was looking for.

    Basically I recognize the Navisionism... However, I was just wondering where in Navision that actual information is stored, so that when you are constructing a SQL query, you can use the named reference and not the integer reference that I'm currently finding as being the only option to access it.

    I'm sure the link must be there to use, it's just a matter of finding out how to re-create the link in SQL.

    Any help would be greatly appreciated,

    Kevin
  • krikikriki Member, Moderator Posts: 9,115
    The actual information is stored in the object itself. So no means to find it outside of Navision.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • dohertykdohertyk Member Posts: 94
    kriki wrote:
    The actual information is stored in the object itself. So no means to find it outside of Navision.

    That's the answer I was afraid of. Thanks for letting me know though.
  • kinekine Member Posts: 12,562
    Still, you can create new table with structure like:

    Table ID, Table Name, Field ID, Field Name, Option ID, Option Caption

    and use RecordRef and FieldRef to fill the table with all values (using FieldRef.OPTIONSTRING or FieldRef.OPTIONCAPTION). After that you can use the values to "translate" the integer to captions or names.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.