Options

Adding value to option string

poppinspoppins Member Posts: 647
edited 2015-01-28 in NAV Three Tier
Hi everyone,

I have an Option field in a table with the following OptionString: opt1,opt2,opt3
I want to add a new value between opt1 and opt2.
Is it possible?or should I add it in the end?

Thanks in advance :mrgreen:

Comments

  • Options
    lvanvugtlvanvugt Member Posts: 774
    Impossible, so add it at the end.
    Luc van Vugt, fluxxus.nl
    Never stop learning
    Van Vugt's dynamiXs
    Dutch Dynamics Community
  • Options
    ftorneroftornero Member Posts: 522
    It's not imposible, the only problem is that you will have the values of this field wrong.

    i.e. if the new OptionString is: opt1,opt11,opt2,opt3

    Then in the records with old value opt2 you'll have opt11 and in the records with old value opt3 you'll have opt2.

    You can run a process to let the field with the right value after the modifcation.

    Regards.
  • Options
    mohana_cse06mohana_cse06 Member Posts: 5,503
    What about the code?

    If you have any code with Option values then they will also change. how do you correct in all places?
    If field.Opt2 = field.Opt2 then
    
    will change to
    If field.Opt11 = field.Opt11 then
    
  • Options
    mohana_cse06mohana_cse06 Member Posts: 5,503
    So its always better to add at the end and also leave few blank values so that we don't have any issues if Microsoft adds new values

    like opt1,opt2,opt3,,,,,,,,,opt11
  • Options
    ftorneroftornero Member Posts: 522
    Yes, you need to take care of the code too, but my point was that it's not a good practice but not imposible, and is your call to use one or another way to do it.

    Regards.
  • Options
    lvanvugtlvanvugt Member Posts: 774
    ftornero wrote:
    Yes, you need to take care of the code too, but my point was that it's not a good practice but not imposible, and is your call to use one or another way to do it.
    You're too positive. Regarding all the consequences (i.e. work to be done) I call it impossible.
    Luc van Vugt, fluxxus.nl
    Never stop learning
    Van Vugt's dynamiXs
    Dutch Dynamics Community
Sign In or Register to comment.