Field Table - Optionstring of <Field> "Type"

warraxwarrax Member Posts: 25
Ifsomeone can quickly help me. I want the Optionstring of the <Field> "Type" in the Field Table - Table 2000000041.

The only way I know of how to do it is to create a new report with the "Field" table, go to the sections, add the <Field> "Type", go to the Properties of the TextBox, go to the <Property> Optionstring, and get the values. Only problem is, my session just kills itself the moment I get to that property - it just disappears without any message or anything. #-o

Can someone please give me the value? [-o<

Thanks

Comments

  • frgustofrgusto Member Posts: 32
    You could create a form on that table, and then get the options list by lookup in the field. Not the actual optionstring, but at least all the option values.

    Regards Fredrik
  • warraxwarrax Member Posts: 25
    Hi

    I know of many ways to get the values, but I want the actual optionstring. I need it to be exactly the same, because I will to comparisons between the 2 tables.
  • bbrownbbrown Member Posts: 3,268
    Compare the values based on their position in the option string (numeric value). That way you don't need the string.
    There are no bugs - only undocumented features.
  • garakgarak Member Posts: 3,263
    test with RecRef and FieldRef
    Do you make it right, it works too!
  • DenSterDenSter Member Posts: 8,304
    Holy cow that is bizarre :shock:

    I tried, added that table as the source table of a form, looked at the properties of the type field, and right as soon as you put the cursor on the option string property the system crashes.....
  • kinekine Member Posts: 12,562
    garak wrote:
    test with RecRef and FieldRef

    This is the correct way. You can read the Captions and Names through the FiledRef.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • XypherXypher Member Posts: 297
    kine wrote:
    garak wrote:
    test with RecRef and FieldRef

    This is the correct way. You can read the Captions and Names through the FiledRef.

    If you don't know the code to use:
    varRecRef.OPEN(2000000041);
    varFieldRef := varRecRef.FIELD(5);
    
    MESSAGE('%1',varFieldRef.OPTIONSTRING);
    

    Or the more appropriate method:
    varRecRef.GETTABLE(FieldTable);
    varFieldRef := varRecRef.FIELD(FieldTable.FIELDNO(Type));
    ...
    
  • BiboBibo Member Posts: 22
    Tried to execute above code with OPTIONSTRING and OPTIONCAPTIONS - both just closed Navision (4.0 SP3 and 5.0 SP1) client. I think there is buffer overflow in code execution.

    Then I created table with one field for every data type. And run process which inserts data about my new table from Field Table in to another table.

    The result "a bit" surprised me., though it could explain buffer overflow:
    OptionNo OptionStr
    34559 Integer
    11519 Text30
    35071 Code10
    12799 Decimal
    35583 Option
    34047 Boolean
    11775 Date
    11776 Time
    33791 Binary4
    33793 BLOB
    11797 DateFormula
    04912 TableFilter
    36095 BigInteger
    36863 Duration
    37119 GUID
    04988 RecordID224
    37375 DateTime

    Of course with Case statement I got what I wanted, but I'm just curios about Type field properties :)
Sign In or Register to comment.